Show / Hide Table of Contents

    Class CsvPipeReaderInput

    Implementation of CsvAsyncInputBase backed by a PipeReader.

    Inheritance
    Object
    CsvAsyncInputBase
    CsvPipeReaderInput
    Inherited Members
    CsvAsyncInputBase.ProcessAsync(CsvReaderVisitorBase, IProgress<Int32>, CancellationToken)
    CsvAsyncInputBase.ThrowIfProcessingHasAlreadyStarted()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Cursively.Inputs
    Assembly: Cursively.dll
    Syntax
    public sealed class CsvPipeReaderInput : CsvAsyncInputBase

    Methods

    | Improve this Doc View Source

    ProcessAsyncCore(CsvReaderVisitorBase, IProgress<Int32>, CancellationToken)

    Implements the inner logic for ProcessAsync(CsvReaderVisitorBase, IProgress<Int32>, CancellationToken).

    Declaration
    protected override ValueTask ProcessAsyncCore(CsvReaderVisitorBase visitor, IProgress<int> progress, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    CsvReaderVisitorBase visitor

    The CsvReaderVisitorBase to describe this CSV data stream to.

    IProgress<Int32> progress

    An optional IProgress<T> instance that will receive a report of the size of each chunk (in bytes) as processing finishes, followed by one more report with a zero when the last chunk in the stream has been processed.

    CancellationToken cancellationToken

    An optional CancellationToken that may be used to signal cancellation.

    Returns
    Type Description
    ValueTask

    A ValueTask encapsulating the operation.

    Overrides
    CsvAsyncInputBase.ProcessAsyncCore(CsvReaderVisitorBase, IProgress<Int32>, CancellationToken)
    Exceptions
    Type Condition
    InvalidOperationException

    Thrown when this stream has already been processed.

    OperationCanceledException

    Thrown to acknowledge a canceled cancellationToken. Some subclasses may throw an instance of a subclass, such as TaskCanceledException.

    | Improve this Doc View Source

    WithDelimiter(Byte)

    Creates a new instance of the CsvPipeReaderInput class as a copy of this one, with the given delimiter.

    Declaration
    public CsvPipeReaderInput 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
    CsvPipeReaderInput

    A new instance of the CsvPipeReaderInput class as a copy of this one, with the given delimiter.

    Exceptions
    Type Condition
    ArgumentException

    Thrown when delimiter is one of the illegal values.

    InvalidOperationException

    Thrown when ProcessAsync(CsvReaderVisitorBase, IProgress<Int32>, CancellationToken) has already been called.

    | Improve this Doc View Source

    WithIgnoreUTF8ByteOrderMark(Boolean)

    Creates a new instance of the CsvPipeReaderInput 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 CsvPipeReaderInput 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
    CsvPipeReaderInput

    A new instance of the CsvPipeReaderInput 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 ProcessAsync(CsvReaderVisitorBase, IProgress<Int32>, CancellationToken) has already been called.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX