API Reference
Interface
ICsvFieldSpanVisitor
Receives CSV fields as transient spans during a single-pass read.
Methods
public virtual Boolean TryVisitEscapedField(Int32 recordIndex, Int32 fieldIndex, ReadOnlySpan<Char> escapedValue, Int32 unescapedLength) #Returns:
BooleanOptionally visits an escaped quoted field without forcing the parser to compact doubled quotes into a scratch buffer.
Parameters
- recordIndex System.Int32
- Zero-based emitted record index.
- fieldIndex System.Int32
- Zero-based field index within the record.
- escapedValue System.ReadOnlySpan{System.Char}
- The quoted field content without surrounding quotes, preserving doubled quote escape sequences.
- unescapedLength System.Int32
- Length of the field after CSV quote unescaping.
Returns
true when the visitor consumed the escaped field; otherwise the parser falls back to Char>) with an unescaped span.
public abstract Void VisitField(Int32 recordIndex, Int32 fieldIndex, ReadOnlySpan<Char> value) #Returns:
VoidVisits one parsed field. The span is valid only for the duration of the call.
Parameters
- recordIndex System.Int32
- Zero-based emitted record index.
- fieldIndex System.Int32
- Zero-based field index within the record.
- value System.ReadOnlySpan{System.Char}
- The field value. Do not capture the span beyond this method.
public virtual Void VisitFieldValue(Int32 recordIndex, 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
- recordIndex System.Int32
- Zero-based emitted record index.
- fieldIndex System.Int32
- Zero-based field index within the record.
- value System.String
- The field value.