DsvDataReader Constructor
Definition
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
readerStreamReaderThe StreamReader object that contains the DSV data.
headerstringThe header defining the columns of the DSV data. Default is reading the first line of the
reader.parserFunc<string, object>The function delegate that returns a primitive object whose value is equivalent to the provided string value. Default is FromValueType().
setupAction<DelimitedStringOptions>The FormattingOptions which may be configured.
Exceptions
- ArgumentException
headercannot be empty or consist only of white-space characters -or-headerdoes not contain the Delimiter specified insetup.- ArgumentNullException
readeris null.