Table of Contents

Struct CsvExceptionHandlerArgs<T>

Namespace
FlameCsv
Assembly
FlameCsv.Core.dll

Arguments for CsvExceptionHandler<T>.

public readonly ref struct CsvExceptionHandlerArgs<T> where T : unmanaged, IBinaryInteger<T>

Type Parameters

T

Token type

Properties

Exception

Exception thrown.

public Exception Exception { get; }

Property Value

Exception

Remarks

CsvFormatException is unrecoverable, and not handled by the callback.

ExpectedFieldCount

Expected number of fields, if known.

public int? ExpectedFieldCount { get; }

Property Value

int?

Header

Returns the header record, or empty if no headers in CSV.

public ImmutableArray<string> Header { get; }

Property Value

ImmutableArray<string>

LineNumber

Returns the 1-based line number of the record in the source data.

public int LineNumber { get; }

Property Value

int

Remarks

Lines are counted as CSV records; newlines inside quoted fields are not counted.

Options

Options instance.

public CsvOptions<T> Options { get; }

Property Value

CsvOptions<T>

Position

Returns the 0-based position of the start of the first field of the record in the source data.

public long Position { get; }

Property Value

long

Remarks

If T is char, this is the character position, even if the data is from a byte stream.

RawRecord

The current CSV record (unescaped/untrimmed).

public ReadOnlySpan<T> RawRecord { get; }

Property Value

ReadOnlySpan<T>

Record

The current CSV record.

[UnscopedRef]
public ref readonly CsvRecordRef<T> Record { get; }

Property Value

CsvRecordRef<T>