ArcBufferWriter
class
Namespace: Orleans.Serialization.Buffers
A
System.Buffers.IBufferWriter implementation implemented using pooled arrays which is specialized for creating System.Buffers.ReadOnlySequence instances. [Orleans.Immutable]public sealed class ArcBufferWriter : IBufferWriter<byte>, IDisposableRemarks
As with
System.Buffers.ArrayPool.Shared, backing buffers can contain data from earlier uses and are returned without clearing. Callers must initialize every byte before advancing the writer and read only the written region of a buffer. Fixed-size pinned pages are reused and evicted every 10 seconds according to recent pool activity. Larger arrays return to System.Buffers.ArrayPool.Shared when their last owner releases them. Constructors
ArcBufferWriterInitializes a new instance of theArcBufferWriterstruct.
Properties
LengthGets the number of unconsumed bytes (alias for UnconsumedLength).ReaderGets a reader over the unconsumed bytes.UnconsumedLengthGets the number of unconsumed bytes.
Methods
AdvanceReader(int)Advances the reader by the specified number of bytes.AdvanceWriter(int)Advances the writer by the specified number of bytes.AppendPinned(ArcBuffer)Appends the pages referenced byinputby pinning them.ConsumeSlice(int)Consumes a slice of the provided length.DisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.GetMemory(int)Returns aSystem.Memoryto write to that is at least the requested size (specified bysizeHint).GetSpan(int)Returns aSystem.Spanto write to that is at least the requested size (specified bysizeHint).Peek(Span<byte>)Attempts to read the provided number of bytes from the buffer.Peek(Span<byte>)Copies the contents of this writer to a span.PeekSlice(int)Returns a slice of the provided length without marking the data referred to it as consumed.ReplenishBuffers(List<ArraySegment<byte>>)Adds additional buffers to the destination list until the list has reached its capacity.ResetResets this instance, returning all memory.Truncate(int)Truncates this buffer to the specified unconsumed length.Write(ReadOnlySequence<byte>)Writes the provided sequence to this buffer.Write(ReadOnlySpan<byte>)Writes the provided value to this buffer.WriteAt(int, ReadOnlySpan<byte>)Overwrites bytes which have already been written without changing the reader or writer positions.
Fields
MinimumPageSizeGets the minimum page size.
