IBufferWriter<T> 接口

定义

表示可以向其中写入 T 数据的输出接收器。Represents an output sink into which T data can be written.

generic <typename T>
public interface class IBufferWriter
public interface IBufferWriter<T>
type IBufferWriter<'T> = interface
Public Interface IBufferWriter(Of T)

类型参数

T

中项的类型 IBufferWriter<T>The type of the items in the IBufferWriter<T>.

派生

方法

Advance(Int32)

通知 IBufferWriter<T>,已向输出 Span<T>Memory<T> 写入 count 数据项。Notifies the IBufferWriter<T> that count data items were written to the output Span<T> or Memory<T>.

GetMemory(Int32)

返回要向其中写入数据的 Memory<T>,且大小至少是 sizeHint 指定的请求大小。Returns a Memory<T> to write to that is at least the requested size (specified by sizeHint).

GetSpan(Int32)

返回要向其中写入数据的 Span<T>,且大小至少是 sizeHint 指定的请求大小。Returns a Span<T> to write to that is at least the requested size (specified by sizeHint).

扩展方法

Write<T>(IBufferWriter<T>, ReadOnlySpan<T>)

value 的内容写入到 writerWrites the contents of value to writer.

适用于