Interface
IDataReaderUtf8TextSource
OfficeIMO.Data
Exposes the current field's text through provider-owned UTF-8 storage.
Remarks
This is an optional capability. A provider may return false for any field that requires decoding, conversion, or materialization. A supporting provider may initialize or update its text cache when a field is requested. The ordinary data-record getters remain available in either case.
Methods
public abstract bool TryGetUtf8Text(int ordinal, out ReadOnlySpan<byte> text) #Attempts to borrow the current field's decoded text as UTF-8 bytes.
Parameters
- ordinal int
- The zero-based field ordinal.
- text System.ReadOnlySpan<byte>
- The borrowed text when successful; otherwise an empty span.
Returns
bool True when the field's text can be borrowed from provider-owned storage.Exceptions
IndexOutOfRangeException– The ordinal is outside the reader's fields.InvalidOperationException– The reader is closed or is not positioned on a row.