Class CsvSyncStreamInput
Implementation of CsvSyncInputBase backed by a Stream.
Inherited Members
Namespace: Cursively.Inputs
Assembly: Cursively.dll
Syntax
public sealed class CsvSyncStreamInput : 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 CsvSyncStreamInput class as a copy of this one, with the given delimiter.
Declaration
public CsvSyncStreamInput 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 |
---|---|
CsvSyncStreamInput | A new instance of the CsvSyncStreamInput 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 CsvSyncStreamInput 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 CsvSyncStreamInput 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 |
---|---|
CsvSyncStreamInput | A new instance of the CsvSyncStreamInput 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. |
WithMinReadBufferByteCount(Int32)
Creates a new instance of the CsvSyncStreamInput class as a copy of this one, reading in chunks of sizes that are at least the given number of bytes.
Declaration
public CsvSyncStreamInput WithMinReadBufferByteCount(int minReadBufferByteCount)
Parameters
Type | Name | Description |
---|---|---|
Int32 | minReadBufferByteCount | The minimum size, in bytes, of chunks to read from the buffer. When using an ArrayPool<T>, this is the value that will be used for Rent(Int32), so larger chunks should be expected. When not using an ArrayPool<T> (i.e., on instances configured by calling WithReadBufferPool(ArrayPool<Byte>) passing in null), this is the actual size of any arrays that will be allocated on the managed heap. |
Returns
Type | Description |
---|---|
CsvSyncStreamInput | A new instance of the CsvSyncStreamInput class as a copy of this one, using the given ArrayPool<T> to provide temporary buffers for the Stream to read into. |
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown when |
InvalidOperationException | Thrown when Process(CsvReaderVisitorBase) has already been called. |
WithReadBufferPool(ArrayPool<Byte>)
Creates a new instance of the CsvSyncStreamInput class as a copy of this one, using the given ArrayPool<T> to provide temporary buffers for the Stream to read into.
Declaration
public CsvSyncStreamInput WithReadBufferPool(ArrayPool<byte> readBufferPool)
Parameters
Type | Name | Description |
---|---|---|
ArrayPool<Byte> | readBufferPool | The ArrayPool<T> to provide temporary buffers for the Stream to read into, or null if the temporary buffers should be allocated directly on the managed heap. |
Returns
Type | Description |
---|---|
CsvSyncStreamInput | A new instance of the CsvSyncStreamInput class as a copy of this one, using the given ArrayPool<T> to provide temporary buffers for the Stream to read into. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown when Process(CsvReaderVisitorBase) has already been called. |