Struct CsvRecordRef<T>
Internal implementation detail. This type should not be used directly.
[EditorBrowsable(EditorBrowsableState.Never)]
public readonly ref struct CsvRecordRef<T> : ICsvRecord<T> where T : unmanaged, IBinaryInteger<T>
Type Parameters
T
- Implements
-
ICsvRecord<T>
Properties
FieldCount
Gets the number of fields in the record.
public int FieldCount { get; }
Property Value
this[int]
Returns the field at index
.
public ReadOnlySpan<T> this[int index] { get; }
Parameters
index
intZero-based index of the field to get.
Property Value
- ReadOnlySpan<T>
Remarks
The span is only guaranteed to be valid until another field or the next record is read.
Exceptions
- IndexOutOfRangeException
Thrown if
index
is less than 0 or greater than or equal to FieldCount
RawValue
Data of the raw record, not including possible trailing newline.
public ReadOnlySpan<T> RawValue { get; }
Property Value
- ReadOnlySpan<T>
Methods
GetRawSpan(int)
Returns the raw unescaped span of the field at the specified index.
public ReadOnlySpan<T> GetRawSpan(int index)
Parameters
index
int0-based field index
Returns
- ReadOnlySpan<T>
Exceptions
- IndexOutOfRangeException
Thrown if
index
is less than 0 or greater than or equal to FieldCount
GetRecordLength()
Returns length of the raw record, not including possible trailing newline.
public int GetRecordLength()
Returns
ToString()
Returns a diagnostic string representation of the current instance.
public override string ToString()
Returns
Remarks
See RawValue to get the actual record span.