Interface ICsvBufferReader<T>
Buffer reader interface for reading CSV data.
public interface ICsvBufferReader<T> : IDisposable, IAsyncDisposable where T : unmanaged
Type Parameters
T
- Inherited Members
Properties
Position
Number of T
that have been read from the underlying data source.
long Position { get; }
Property Value
Remarks
The position is updated after each read operation, not advance.
Methods
Advance(int)
Advances the reader by the specified number of characters.
void Advance(int count)
Parameters
count
intNumber of characters processed from the read result
Remarks
Similar to a pipe reader, advancing the reader invalidates the data in the previous read result.
Read()
Reads from the inner data source.
CsvReadResult<T> Read()
Returns
- CsvReadResult<T>
The current data available from the reader, and whether any more data can be read.
ReadAsync(CancellationToken)
Asynchronously reads data from the inner data source.
ValueTask<CsvReadResult<T>> ReadAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationTokenCancellation token to cancel the read operation
Returns
- ValueTask<CsvReadResult<T>>
A task returning the current data available from the reader, and whether any more data can be read.
TryReset()
Attempts to reset the reader to the beginning of the data source.
bool TryReset()
Returns
- bool
true
if the reader was reset successfully;false
if the reader does not support resetting.
Exceptions
- ObjectDisposedException