Class CsvPipeReader
Static class that can be used to create ICsvPipeReader<T> instances.
[EditorBrowsable(EditorBrowsableState.Advanced)]
public static class CsvPipeReader
- Inheritance
-
CsvPipeReader
Methods
Create(in ReadOnlySequence<byte>)
Creates a new pipe reader over the CSV data.
public static ICsvPipeReader<byte> Create(in ReadOnlySequence<byte> csv)
Parameters
csv
ReadOnlySequence<byte>CSV data
Returns
Create(in ReadOnlySequence<char>)
Creates a new pipe reader over the CSV data.
public static ICsvPipeReader<char> Create(in ReadOnlySequence<char> csv)
Parameters
csv
ReadOnlySequence<char>CSV data
Returns
Create(Stream, MemoryPool<byte>?, CsvReaderOptions)
Creates a new CSV reader instance from a Stream.
public static ICsvPipeReader<byte> Create(Stream stream, MemoryPool<byte>? memoryPool = null, CsvReaderOptions options = default)
Parameters
stream
StreamThe stream
memoryPool
MemoryPool<byte>Memory pool used; defaults to Shared.
options
CsvReaderOptionsOptions to configure the reader
Returns
Remarks
If the stream is a MemoryStream, the buffer is accessed directly for zero-copy reads if possible.
Create(Stream, Encoding?, MemoryPool<char>?, CsvReaderOptions)
public static ICsvPipeReader<char> Create(Stream stream, Encoding? encoding, MemoryPool<char>? memoryPool = null, CsvReaderOptions options = default)
Parameters
stream
StreamThe stream
encoding
EncodingEncoding used to read the bytes
memoryPool
MemoryPool<char>Memory pool used; defaults to Shared.
options
CsvReaderOptionsOptions to configure the reader
Returns
Create(TextReader, MemoryPool<char>?, CsvReaderOptions)
Creates a new CSV reader instance from a TextReader.
public static ICsvPipeReader<char> Create(TextReader reader, MemoryPool<char>? memoryPool = null, CsvReaderOptions options = default)
Parameters
reader
TextReaderThe text reader
memoryPool
MemoryPool<char>Memory pool used; defaults to Shared.
options
CsvReaderOptionsOptions to configure the reader
Returns
Remarks
If the stream is a StringReader, the internal string is accessed directly for zero-copy reads.
Create(ReadOnlyMemory<byte>)
Creates a new pipe reader over the CSV data.
public static ICsvPipeReader<byte> Create(ReadOnlyMemory<byte> csv)
Parameters
csv
ReadOnlyMemory<byte>CSV data
Returns
Create(ReadOnlyMemory<char>)
Creates a new pipe reader over the CSV data.
public static ICsvPipeReader<char> Create(ReadOnlyMemory<char> csv)
Parameters
csv
ReadOnlyMemory<char>CSV data
Returns
Create(string?)
Creates a new pipe reader over the CSV data.
public static ICsvPipeReader<char> Create(string? csv)
Parameters
csv
stringCSV data
Returns
Create(StringBuilder?)
Creates a new pipe reader over the CSV data.
public static ICsvPipeReader<char> Create(StringBuilder? csv)
Parameters
csv
StringBuilderString builder containing the CSV
Returns
Remarks
The StringBuilder must not be modified while the reader is in use.
Create<T>(in ReadOnlySequence<T>)
Creates a new pipe reader over the CSV data.
public static ICsvPipeReader<T> Create<T>(in ReadOnlySequence<T> csv) where T : unmanaged, IBinaryInteger<T>
Parameters
csv
ReadOnlySequence<T>CSV data
Returns
Type Parameters
T