Szerkesztés

Megosztás a következőn keresztül:


PrefixingBufferWriter<T,TBufferWriter>.Sequence Class

Definition

Manages a sequence of elements, readily castable as a ReadOnlySequence<T>.

public class PrefixingBufferWriter<T,TBufferWriter>.Sequence : IDisposable, System.Buffers.IBufferWriter<T> where TBufferWriter : IBufferWriter<T>
type PrefixingBufferWriter<'T, 'BufferWriter (requires 'BufferWriter :> IBufferWriter<'T>)>.Sequence = class
    interface IBufferWriter<'T>
    interface IDisposable
Public Class PrefixingBufferWriter(Of T, TBufferWriter).Sequence
Implements IBufferWriter(Of T), IDisposable

Type Parameters

T
TBufferWriter
Inheritance
PrefixingBufferWriter<T,TBufferWriter>.Sequence
Implements

Remarks

Instance members are not thread-safe.

Constructors

PrefixingBufferWriter<T,TBufferWriter>.Sequence(MemoryPool<T>)

Initializes a new instance of the PrefixingBufferWriter<T,TBufferWriter>.Sequence class.

Properties

AsReadOnlySequence

Gets this sequence expressed as a ReadOnlySequence<T>.

Length

Gets the length of the sequence.

Methods

Advance(Int32)

Advances the sequence to include the specified number of elements initialized into memory returned by a prior call to GetMemory(Int32).

AdvanceTo(SequencePosition)

Removes all elements from the sequence from its beginning to the specified position, considering that data to have been fully processed.

Dispose()

Clears the entire sequence, recycles associated memory into pools, and resets this instance for reuse. This invalidates any ReadOnlySequence<T> previously produced by this instance.

GetMemory(Int32)

Gets writable memory that can be initialized and added to the sequence via a subsequent call to Advance(Int32).

GetSpan(Int32)

Gets writable memory that can be initialized and added to the sequence via a subsequent call to Advance(Int32).

Reset()

Clears the entire sequence and recycles associated memory into pools. This invalidates any ReadOnlySequence<T> previously produced by this instance.

Operators

Implicit(PrefixingBufferWriter<T,TBufferWriter>.Sequence to ReadOnlySequence<T>)

Applies to