API Reference

Interface

ICsvRowFieldSpanVisitor

Namespace OfficeIMO.CSV
Assembly OfficeIMO.CSV
Modifiers abstract

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: Void

Starts a data row. The header has already been discovered, normalized, and validated.

Parameters

header System.Collections.Generic.IReadOnlyList{System.String} requiredposition: 0
Normalized header names for the row.
rowIndex System.Int32 requiredposition: 1
Zero-based emitted data row index.
public abstract Void EndRow(Int32 rowIndex, Int32 fieldCount) #
Returns: Void

Completes a data row after all emitted field spans have been visited.

Parameters

rowIndex System.Int32 requiredposition: 0
Zero-based emitted data row index.
fieldCount System.Int32 requiredposition: 1
Number of fields parsed from the source row before column-count alignment.
public abstract Void VisitField(Int32 rowIndex, Int32 fieldIndex, ReadOnlySpan<Char> value) #
Returns: Void

Visits one data field. The span is valid only for the duration of the call.

Parameters

rowIndex System.Int32 requiredposition: 0
Zero-based emitted data row index.
fieldIndex System.Int32 requiredposition: 1
Zero-based field index within the normalized header width.
value System.ReadOnlySpan{System.Char} requiredposition: 2
The field value. Do not capture the span beyond this method.
public virtual Void VisitFieldValue(Int32 rowIndex, Int32 fieldIndex, String value) #
Returns: Void

Visits one parsed string field. Implement this to avoid copying fields that were already materialized while parsing quoted records.

Parameters

rowIndex System.Int32 requiredposition: 0
Zero-based emitted data row index.
fieldIndex System.Int32 requiredposition: 1
Zero-based field index within the normalized header width.
value System.String requiredposition: 2
The field value.