PooledBuffer
struct
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 struct PooledBuffer : IBufferWriter<byte>, IDisposableConstructors
PooledBufferInitializes a new instance of thePooledBufferstruct.
Properties
LengthGets the total length which has been written.MemorySegmentsReturns an enumerator which can be used to enumerate the data referenced by this instance.
Methods
Advance(int)Notifies theSystem.Buffers.IBufferWriterthatcountdata items were written to the outputSystem.SpanorSystem.Memory.AsReadOnlySequenceReturns a newSystem.Buffers.ReadOnlySequencewhich must not be accessed after disposing this instance.CopyTo(Span<byte>)Copies the contents of this writer to a span.CopyTo(TBufferWriter)Copies the contents of this writer to another writer.CopyTo(Writer<TBufferWriter>)Copies the contents of this writer to another writer.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).ResetResets this instance, returning all memory.SliceReturns aBufferSlicecovering this entire buffer.Slice(int)Returns a slice of this buffer, beginning at the specified offset.Slice(int, int)Returns a slice of this buffer, beginning at the specified offset and having the specified length.ToArrayReturns the data which has been written as an array.Write(ReadOnlySequence<byte>)Writes the provided sequence to this buffer.Write(ReadOnlySpan<byte>)Writes the provided value to this buffer.
