Click or drag to resize

JCOBridgeDirectBufferTAsWritableSpan Method

Returns a zero-copy writable SpanT over the entire buffer, starting at offset zero regardless of the current position.

Contract: if any element is modified through the returned span, FlushOnDispose MUST be called before Dispose to ensure changes are written back. Failing to do so results in silent data loss. For single or sparse writes prefer Write(...), which sets the flush flag automatically.


Namespace: MASES.JCOBridge.C2JBridge
Assembly: C2JBridge (in C2JBridge.dll) Version: 2.6.9.260611-9a148513a79c26cdd7f1dde468f4f9e06ef3bc7e
Syntax
public Span<T> AsWritableSpan()

Return Value

SpanT
A SpanT of length buffer limit / sizeof(T) backed directly by the native memory buffer.
Exceptions
ExceptionCondition
NotSupportedException Thrown when the buffer exceeds MaxValue elements.
See Also