ArcBuffer
struct
Namespace: Orleans.Serialization.Buffers
Represents a reference-counted slice of raw bytes from an
ArcBufferWriter. public struct ArcBuffer : IDisposableRemarks
An owned slice must be disposed when no longer needed. Copying this struct creates a borrowed view whose lifetime is bounded by the owner. Use
ArcBuffer to obtain an independent owner. Referenced bytes must remain unchanged while a slice is in use. The default value is a valid, owner-free empty buffer. Constructors
ArcBuffer(ArcBufferPage?, int, int, int)Creates a borrowed view over a valid, pinned page chain.
Properties
ArraySegmentsReturns an enumerator which can be used to enumerate the array segments referenced by this instance.EmptyGets an empty buffer which owns no pages.IsEmptyGets whether this buffer contains no bytes.MemorySegmentsReturns an enumerator which can be used to enumerate the memory segments referenced by this instance.SpanSegmentsReturns an enumerator which can be used to enumerate the span segments referenced by this instance.
Methods
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(ArcBufferWriter)Copies the contents of this writer to a pooled buffer.CopyTo(TBufferWriter)Copies the contents of this writer to a buffer writer.DisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.GetEnumeratorReturns an enumerator which can be used to enumerate the span segments referenced by this instance.PinPins this slice, preventing the referenced pages from being returned to the pool.Slice(int)Creates a pinned slice from the specified offset to the end of this buffer.Slice(int, int)Creates a pinned slice of the specified length.ToArrayReturns the data which has been written as an array.UnpinUnpins this slice, allowing the referenced pages to be returned to the pool.UnsafeSlice(int, int)Creates a slice whose lifetime is bounded by this buffer.
