Table of Contents

DsvDataReader Constructor

Definition

Namespace
Cuemon.Data
Assemblies
Cuemon.Data.dll
Source
src/Cuemon.Data/DsvDataReader.cs

DsvDataReader(StreamReader, string, Func<string, object>, Action<DelimitedStringOptions>)

Initializes a new instance of the DsvDataReader class.

public DsvDataReader(StreamReader reader, string header = null, Func<string, object> parser = null, Action<DelimitedStringOptions> setup = null)

Parameters

reader StreamReader

The StreamReader object that contains the DSV data.

header string

The header defining the columns of the DSV data. Default is reading the first line of the reader.

parser Func<string, object>

The function delegate that returns a primitive object whose value is equivalent to the provided string value. Default is FromValueType().

setup Action<DelimitedStringOptions>

The FormattingOptions which may be configured.

Exceptions

ArgumentException

header cannot be empty or consist only of white-space characters -or- header does not contain the Delimiter specified in setup.

ArgumentNullException

reader is null.