Class RewritingStream
public abstract class RewritingStream : Stream, IDisposable, IAsyncDisposable
- Inheritance
-
RewritingStream
- Implements
- Derived
- Inherited Members
Constructors
RewritingStream(Stream)
protected RewritingStream(Stream next)
Parameters
next
StreamThe stream that this stream is writing to.
Properties
CanRead
public override bool CanRead { get; }
Property Value
CanSeek
public override bool CanSeek { get; }
Property Value
CanWrite
public override bool CanWrite { get; }
Property Value
Length
public override long Length { get; }
Property Value
Position
public override long Position { get; set; }
Property Value
Methods
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposing
bool
Flush()
public override void Flush()
FlushAsync(CancellationToken)
public override Task FlushAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationToken
Returns
Read(byte[], int, int)
public override int Read(byte[] buffer, int offset, int count)
Parameters
Returns
Seek(long, SeekOrigin)
public override long Seek(long offset, SeekOrigin origin)
Parameters
offset
longorigin
SeekOrigin
Returns
SetLength(long)
public override void SetLength(long value)
Parameters
value
long
Write(byte[], int, int)
public override void Write(byte[] buffer, int offset, int count)
Parameters
Write(ReadOnlySpan<byte>)
public override abstract void Write(ReadOnlySpan<byte> buffer)
Parameters
buffer
ReadOnlySpan<byte>
WriteAsync(byte[], int, int, CancellationToken)
public override Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Parameters
buffer
byte[]offset
intcount
intcancellationToken
CancellationToken
Returns
WriteAsync(ReadOnlyMemory<byte>, CancellationToken)
public override abstract ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
Parameters
buffer
ReadOnlyMemory<byte>cancellationToken
CancellationToken