mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-22 15:04:43 +00:00
build fixes
This commit is contained in:
@@ -192,6 +192,7 @@ internal class AsyncMarkingBinaryReader : IDisposable
|
||||
}
|
||||
|
||||
public virtual void Dispose() => _reader.Dispose();
|
||||
|
||||
#if NET8_0_OR_GREATER
|
||||
public virtual ValueTask DisposeAsync() => _reader.DisposeAsync();
|
||||
#endif
|
||||
|
||||
@@ -9,8 +9,17 @@ using SharpCompress.Compressors.LZMA.RangeCoder;
|
||||
|
||||
namespace SharpCompress.Compressors.LZMA;
|
||||
|
||||
public partial class Decoder : ICoder, ISetDecoderProperties
|
||||
public partial class Decoder : IAsyncDisposable
|
||||
{
|
||||
public async ValueTask DisposeAsync()
|
||||
{
|
||||
if (_outWindow is not null)
|
||||
{
|
||||
await _outWindow.DisposeAsync().ConfigureAwait(false);
|
||||
_outWindow = null;
|
||||
}
|
||||
}
|
||||
|
||||
partial class LenDecoder
|
||||
{
|
||||
public async ValueTask<uint> DecodeAsync(
|
||||
|
||||
@@ -9,8 +9,14 @@ using SharpCompress.Compressors.LZMA.RangeCoder;
|
||||
|
||||
namespace SharpCompress.Compressors.LZMA;
|
||||
|
||||
public partial class Decoder : ICoder, ISetDecoderProperties // ,System.IO.Stream
|
||||
public partial class Decoder : ICoder, ISetDecoderProperties, IDisposable
|
||||
{
|
||||
public void Dispose()
|
||||
{
|
||||
_outWindow?.Dispose();
|
||||
_outWindow = null;
|
||||
}
|
||||
|
||||
private partial class LenDecoder
|
||||
{
|
||||
private BitDecoder _choice = new();
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#if LEGACY_DOTNET
|
||||
using System;
|
||||
|
||||
#if LEGACY_DOTNET
|
||||
|
||||
namespace SharpCompress;
|
||||
|
||||
@@ -10,4 +12,9 @@ internal static class StringExtensions
|
||||
internal static bool Contains(this string text, char value) => text.IndexOf(value) > -1;
|
||||
}
|
||||
|
||||
[AttributeUsage(
|
||||
AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue
|
||||
)]
|
||||
public class NotNullAttribute : Attribute;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user