API Reference
Interface
ICsvRowFieldSpanVisitor
Receives header-aware CSV data rows as transient field spans during a single-pass read.
Methods
public abstract Void BeginRow(IReadOnlyList<String> header, Int32 rowIndex) #Returns:
VoidStarts a data row. The header has already been discovered, normalized, and validated.
Parameters
- header System.Collections.Generic.IReadOnlyList{System.String}
- Normalized header names for the row.
- rowIndex System.Int32
- Zero-based emitted data row index.
public abstract Void EndRow(Int32 rowIndex, Int32 fieldCount) #Returns:
VoidCompletes a data row after all emitted field spans have been visited.
Parameters
- rowIndex System.Int32
- Zero-based emitted data row index.
- fieldCount System.Int32
- Number of fields parsed from the source row before column-count alignment.
public abstract Void VisitField(Int32 rowIndex, Int32 fieldIndex, ReadOnlySpan<Char> value) #Returns:
VoidVisits one data field. The span is valid only for the duration of the call.
Parameters
- rowIndex System.Int32
- Zero-based emitted data row index.
- fieldIndex System.Int32
- Zero-based field index within the normalized header width.
- value System.ReadOnlySpan{System.Char}
- The field value. Do not capture the span beyond this method.
public virtual Void VisitFieldValue(Int32 rowIndex, Int32 fieldIndex, String value) #Returns:
VoidVisits one parsed string field. Implement this to avoid copying fields that were already materialized while parsing quoted records.
Parameters
- rowIndex System.Int32
- Zero-based emitted data row index.
- fieldIndex System.Int32
- Zero-based field index within the normalized header width.
- value System.String
- The field value.