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
Constructors
CsvExceptionHandlerArgs(ref readonly CsvFields<T>, ReadOnlySpan<string>, Exception, int, long)
Initializes a new instance of CsvExceptionHandlerArgs<T>.
public CsvExceptionHandlerArgs(ref readonly CsvFields<T> fields, ReadOnlySpan<string> header, Exception exception, int lineIndex, long position)
Parameters
Properties
Exception
Exception thrown.
public Exception Exception { get; }
Property Value
FieldCount
Gets the number of fields in the record.
public int FieldCount { get; }
Property Value
Header
Returns the header record, or empty if no headers in CSV.
public ReadOnlySpan<string> Header { get; }
Property Value
Line
1-based line number.
public int Line { get; }
Property Value
Options
Options instance.
public CsvOptions<T> Options { get; }
Property Value
- CsvOptions<T>
Position
0-based character position in the data, measured from the start of the unescaped record.
public long Position { get; }
Property Value
Record
The current CSV record (unescaped/untrimmed).
public ReadOnlySpan<T> Record { get; }
Property Value
- ReadOnlySpan<T>
Methods
GetField(int, bool)
Returns the value of a field.
public ReadOnlySpan<T> GetField(int index, bool raw = false)
Parameters
Returns
- ReadOnlySpan<T>
Value of the field