Defines methods used to read parsed data
from a CSV file.
- Namespace
- CsvHelper
- Interfaces
-
- IReaderRow
- IDisposable
- Implementing Types
graph BT
Type-.->Interface0["IReaderRow"]
click Interface0 "/CsvHelper/api/CsvHelper/IReaderRow"
Type-.->Interface1["IDisposable"]
Type["IReader"]
class Type type-node
Implementing0["CsvReader"]-.->Type
click Implementing0 "/CsvHelper/api/CsvHelper/CsvReader"
Syntax
public interface IReader : IReaderRow, IDisposable
Methods
Name | Return Value | Summary |
---|---|---|
EnumerateRecords |
IEnumerable |
Enumerates the records hydrating the given record instance with row data.
The record instance is re-used and not cleared on each enumeration.
This only works for streaming rows. If any methods are called on the projection
that force the evaluation of the IEnumerable, such as ToList(), the entire list
will contain the same instance of the record, which is the last row.
|
Enumerate |
IAsyncEnumerable |
Enumerates the records hydrating the given record instance with row data.
The record instance is re-used and not cleared on each enumeration.
This only works for streaming rows. If any methods are called on the projection
that force the evaluation of the IEnumerable, such as ToList(), the entire list
will contain the same instance of the record, which is the last row.
|
GetRecords |
IEnumerable |
Gets all the records in the CSV file and converts each to the specified
Type .
The Read method should not be used when using this.
|
GetRecords |
IEnumerable |
Gets all the records in the CSV file and converts each to T.
The Read method should not be used when using this.
|
GetRecords |
IEnumerable |
Gets all the records in the CSV file and converts each to T.
The Read method should not be used when using this.
|
GetRecordsAsync |
IAsyncEnumerable |
Gets all the records in the CSV file and converts each to the specified
Type .
The Read method should not be used when using this.
|
GetRecordsAsync |
IAsyncEnumerable |
Gets all the records in the CSV file and converts each to T.
The Read method should not be used when using this.
|
GetRecordsAsync |
IAsyncEnumerable |
Gets all the records in the CSV file and converts each to T.
The Read method should not be used when using this.
|
Read |
bool |
Advances the reader to the next record. This will not read headers.
You need to call
Read() then ReadHeader()
for the headers to be read.
|
ReadAsync |
Task |
Advances the reader to the next record. This will not read headers.
You need to call
ReadAsync() then ReadHeader()
for the headers to be read.
|
ReadHeader |
bool |
Reads the header record without reading the first row.
|