Files
sharpcompress/src/SharpCompress/IO/AsyncStream.cs
2021-02-13 16:44:53 +00:00

71 lines
1.8 KiB
C#

using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
namespace SharpCompress.IO
{
public abstract class AsyncStream : Stream
{
protected sealed override void Dispose(bool disposing)
{
if (disposing)
{
throw new NotSupportedException();
}
}
public sealed override void Flush()
{
throw new NotSupportedException();
}
public abstract override ValueTask DisposeAsync();
public sealed override int Read(byte[] buffer, int offset, int count)
{
throw new NotSupportedException();
}
public sealed override void Write(byte[] buffer, int offset, int count)
{
throw new NotSupportedException();
}
public sealed override IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback? callback, object? state)
{
throw new NotSupportedException();
}
public sealed override int EndRead(IAsyncResult asyncResult)
{
throw new NotSupportedException();
}
public sealed override int ReadByte()
{
throw new NotSupportedException();
}
public sealed override void WriteByte(byte b)
{
throw new NotSupportedException();
}
public abstract override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken);
#if !NET461 && !NETSTANDARD2_0
public sealed override int Read(Span<byte> buffer)
{
throw new NotSupportedException();
}
public sealed override void Write(ReadOnlySpan<byte> buffer)
{
throw new NotSupportedException();
}
#endif
}
}