BiffReaderState Struct
Definition
Carries the state a BiffReader needs to continue a stream across buffers: the established BIFF version and the active code page.
public struct BiffReaderState
- Inherited Members
- Extension Methods
Remarks
BiffReader is a ref struct and cannot be stored in a field. A consumer that reads
incrementally - a class that walks a substream one record per call, or a loop feeding chunks of a
Stream - captures CurrentState after each pass, slices its buffer at
BytesConsumed, and constructs the next reader from the remaining bytes and the captured
state. The record position itself is not part of the state: it is expressed by where the caller slices the buffer.
Constructors
BiffReaderState(BiffReaderOptions)
Initializes a new instance of the BiffReaderState struct describing the start of a stream.
public BiffReaderState(BiffReaderOptions options = default)
Parameters
optionsBiffReaderOptionsThe options that seed the version and code page.
Properties
CodePage
Gets the code page in effect for byte strings.
public readonly int CodePage { get; }
Property Value
- int
The Windows code page number from the most recent
CODEPAGErecord or the options, or DefaultCodePage when neither has supplied one.
Options
Gets the options the reader was created with.
public readonly BiffReaderOptions Options { get; }
Property Value
- BiffReaderOptions
The options.
Version
Gets the BIFF version established so far.
public readonly BiffVersion Version { get; }
Property Value
- BiffVersion
The version, or Unknown before a
BOFrecord has been read.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |