Class CsvMemoryMappedFileInput
Implementation of CsvSyncInputBase backed by a file from the filesystem that will be processed by mapping it into virtual memory and then treating it like a contiguous array of bytes.
Inherited Members
Namespace: Cursively.Inputs
Assembly: Cursively.dll
Syntax
public sealed class CsvMemoryMappedFileInput : CsvSyncInputBase
Methods
| Improve this Doc View SourceProcessCore(CsvReaderVisitorBase)
Implements the inner logic for Process(CsvReaderVisitorBase).
Declaration
protected override void ProcessCore(CsvReaderVisitorBase visitor)
Parameters
Type | Name | Description |
---|---|---|
CsvReaderVisitorBase | visitor | The CsvReaderVisitorBase to describe this CSV data stream to. |
Overrides
Remarks
The base class will call this method at most once per instance.
WithDelimiter(Byte)
Creates a new instance of the CsvMemoryMappedFileInput class as a copy of this one, with the given delimiter.
Declaration
public CsvMemoryMappedFileInput WithDelimiter(byte delimiter)
Parameters
Type | Name | Description |
---|---|---|
Byte | delimiter | The delimiter to use. Use IsValidDelimiter(Byte) to test whether or not a particular value is valid. |
Returns
Type | Description |
---|---|
CsvMemoryMappedFileInput | A new instance of the CsvMemoryMappedFileInput class as a copy of this one, with the given delimiter. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown when |
InvalidOperationException | Thrown when Process(CsvReaderVisitorBase) has already been called. |
WithIgnoreUTF8ByteOrderMark(Boolean)
Creates a new instance of the CsvReadOnlyMemoryInput class as a copy of this one, with the given flag indicating whether or not a leading UTF-8 byte order mark, if present, should be omitted from the first field's data.
Declaration
public CsvMemoryMappedFileInput WithIgnoreUTF8ByteOrderMark(bool ignoreUTF8ByteOrderMark)
Parameters
Type | Name | Description |
---|---|---|
Boolean | ignoreUTF8ByteOrderMark | A value indicating whether or not a leading UTF-8 byte order mark, if present, should be omitted from the first field's data. |
Returns
Type | Description |
---|---|
CsvMemoryMappedFileInput | A new instance of the CsvReadOnlyMemoryInput class as a copy of this one, with the given flag indicating whether or not a leading UTF-8 byte order mark, if present, should be omitted from the first field's data. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown when Process(CsvReaderVisitorBase) has already been called. |