RecyclableMemoryStream.GetReadOnlySequence method
October 6, 2021 · View on GitHub
Returns a sequence containing the contents of the stream.
public ReadOnlySequence<byte> GetReadOnlySequence()
Return Value
A ReadOnlySequence of bytes.
Exceptions
| exception | condition |
|---|---|
| ObjectDisposedException | Object has been disposed. |
Remarks
IMPORTANT: Calling Write(), GetMemory(), GetSpan(), Dispose(), or Close() after calling GetReadOnlySequence() invalidates the sequence.
See Also
- class RecyclableMemoryStream
- namespace Microsoft.IO