Class CsvSyncInput
Helpers to create inputs that describe CSV data streams synchronously.
Inherited Members
Namespace: Cursively
Assembly: Cursively.dll
Syntax
public static class CsvSyncInput
Methods
| Improve this Doc View SourceForMemory(ReadOnlyMemory<Byte>)
Creates an input that can describe the contents of a given ReadOnlyMemory<T> of bytes to an instance of CsvReaderVisitorBase, synchronously.
Declaration
public static CsvReadOnlyMemoryInput ForMemory(ReadOnlyMemory<byte> memory)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlyMemory<Byte> | memory | The ReadOnlyMemory<T> of bytes that contains the CSV data. |
Returns
Type | Description |
---|---|
CsvReadOnlyMemoryInput | An instance of CsvReadOnlyMemoryInput wrapping |
ForMemoryMappedFile(String)
Creates an input that can describe the contents of a given file to an instance of CsvReaderVisitorBase, synchronously using memory-mapping.
Declaration
public static CsvMemoryMappedFileInput ForMemoryMappedFile(string csvFilePath)
Parameters
Type | Name | Description |
---|---|---|
String | csvFilePath | The path to the file that contains the CSV data. The only validation that Cursively does is IsNullOrWhiteSpace(String). |
Returns
Type | Description |
---|---|
CsvMemoryMappedFileInput | An instance of CsvMemoryMappedFileInput wrapping
|
Exceptions
Type | Condition |
---|---|
ArgumentNullException | Thrown when |
ArgumentException | Thrown when |
ForSequence(ReadOnlySequence<Byte>)
Creates an input that can describe the contents of a given ReadOnlySequence<T> of bytes to an instance of CsvReaderVisitorBase, synchronously.
Declaration
public static CsvReadOnlySequenceInput ForSequence(ReadOnlySequence<byte> sequence)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySequence<Byte> | sequence | The ReadOnlySequence<T> of bytes that contains the CSV data. |
Returns
Type | Description |
---|---|
CsvReadOnlySequenceInput | An instance of CsvReadOnlySequenceInput wrapping |
ForStream(Stream)
Creates an input that can describe the contents of a given Stream to an instance of CsvReaderVisitorBase, synchronously.
Declaration
public static CsvSyncStreamInput ForStream(Stream csvStream)
Parameters
Type | Name | Description |
---|---|---|
Stream | csvStream | The Stream that contains the CSV data. |
Returns
Type | Description |
---|---|
CsvSyncStreamInput | An instance of CsvSyncStreamInput wrapping |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown when |