TestMultiSegmentBufferWriter
class
Namespace: Orleans.Serialization.TestKit
Provides a buffer writer which stores committed bytes in multiple segments for serialization tests.
public class TestMultiSegmentBufferWriter : IOutputBuffer, IBufferWriter<byte>Constructors
TestMultiSegmentBufferWriter(int)Initializes a new instance of theTestMultiSegmentBufferWriterclass.
Methods
Advance(int)Notifies theSystem.Buffers.IBufferWriterthatcountdata items were written to the outputSystem.SpanorSystem.Memory.GetMemory(int)Gets writable memory, capped by the configured maximum allocation size.GetReadOnlySequence(int)Returns the written bytes as a read-only sequence.GetSpan(int)Gets a writable span, capped by the configured maximum allocation size.PeekAllBuffersReturns all committed buffers followed by the current uncommitted buffer.
