Class CsvTypeMapEnumerable<T, TValue>
- Namespace
- FlameCsv.Enumeration
- Assembly
- FlameCsv.Core.dll
Enumerable that can be used to read TValue
using reflection.
public sealed class CsvTypeMapEnumerable<T, TValue> : IEnumerable<TValue>, IEnumerable, ICsvValueAsyncEnumerable<T, TValue>, IAsyncEnumerable<TValue> where T : unmanaged, IBinaryInteger<T>
Type Parameters
T
TValue
- Inheritance
-
CsvTypeMapEnumerable<T, TValue>
- Implements
-
IEnumerable<TValue>ICsvValueAsyncEnumerable<T, TValue>IAsyncEnumerable<TValue>
Constructors
CsvTypeMapEnumerable(ICsvPipeReader<T>, CsvOptions<T>, CsvTypeMap<T, TValue>)
Creates a new instance that can be used to read CSV records.
public CsvTypeMapEnumerable(ICsvPipeReader<T> reader, CsvOptions<T> options, CsvTypeMap<T, TValue> typeMap)
Parameters
reader
ICsvPipeReader<T>options
CsvOptions<T>typeMap
CsvTypeMap<T, TValue>
CsvTypeMapEnumerable(in ReadOnlySequence<T>, CsvOptions<T>, CsvTypeMap<T, TValue>)
Creates a new instance that can be used to read CSV records.
public CsvTypeMapEnumerable(in ReadOnlySequence<T> csv, CsvOptions<T> options, CsvTypeMap<T, TValue> typeMap)
Parameters
csv
ReadOnlySequence<T>options
CsvOptions<T>typeMap
CsvTypeMap<T, TValue>
CsvTypeMapEnumerable(ReadOnlyMemory<T>, CsvOptions<T>, CsvTypeMap<T, TValue>)
Creates a new instance that can be used to read CSV records.
public CsvTypeMapEnumerable(ReadOnlyMemory<T> csv, CsvOptions<T> options, CsvTypeMap<T, TValue> typeMap)
Parameters
csv
ReadOnlyMemory<T>options
CsvOptions<T>typeMap
CsvTypeMap<T, TValue>
Methods
GetAsyncEnumerator(CancellationToken)
Returns an enumerator that iterates asynchronously through the collection.
public CsvTypeMapEnumerator<T, TValue> GetAsyncEnumerator(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenA CancellationToken that may be used to cancel the asynchronous iteration.
Returns
- CsvTypeMapEnumerator<T, TValue>
An enumerator that can be used to iterate asynchronously through the collection.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public CsvTypeMapEnumerator<T, TValue> GetEnumerator()
Returns
- CsvTypeMapEnumerator<T, TValue>
An enumerator that can be used to iterate through the collection.
WithExceptionHandler(CsvExceptionHandler<T>?)
Sets the exception handler for the enumerator. If the handler returns true, the exception is considered handled and the record is skipped.
public CsvTypeMapEnumerable<T, TValue> WithExceptionHandler(CsvExceptionHandler<T>? handler)
Parameters
handler
CsvExceptionHandler<T>Exception handler. Set to null to remove an existing handler
Returns
- CsvTypeMapEnumerable<T, TValue>
The same enumerable instance