Skip to content

DiGi.Core.IO.DelimitedData.Classes

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.Core.IO.DelimitedData.Classes Namespace

Classes

DelimitedDataReader Class

Reader for delimited data files.

public class DelimitedDataReader : System.IO.StreamReader, DiGi.Core.IO.DelimitedData.Interfaces.IDelimitedDataReader

Inheritance System.ObjectSystem.MarshalByRefObjectSystem.IO.TextReaderSystem.IO.StreamReader → DelimitedDataReader

Implements IDelimitedDataReader

Constructors

DelimitedDataReader(char, string) Constructor

Initializes a new instance of the DelimitedDataReader class.

public DelimitedDataReader(char separator, string path);

Parameters

separator System.Char

The character to use as the separator.

path System.String

The path to the file containing the delimited data.

DelimitedDataReader(char, IEnumerable<string>) Constructor

Initializes a new instance of the DelimitedDataReader class.

public DelimitedDataReader(char separator, System.Collections.Generic.IEnumerable<string> lines);

Parameters

separator System.Char

The character to use as the separator.

lines System.Collections.Generic.IEnumerable<System.String>

The collection of lines containing the delimited data.

DelimitedDataReader(char, Stream) Constructor

Initializes a new instance of the DelimitedDataReader class.

public DelimitedDataReader(char separator, System.IO.Stream stream);

Parameters

separator System.Char

The character used as a separator.

stream System.IO.Stream

The stream to read from.

DelimitedDataReader(DelimitedDataSeparator, string) Constructor

Initializes a new instance of the DelimitedDataReader class.

public DelimitedDataReader(DiGi.Core.IO.DelimitedData.Enums.DelimitedDataSeparator delimitedDataSeparator, string path);

Parameters

delimitedDataSeparator DelimitedDataSeparator

The separator to use for delimited data.

path System.String

The path to the file containing the delimited data.

DelimitedDataReader(DelimitedDataSeparator, string, Encoding) Constructor

Initializes a new instance of the DelimitedDataReader class.

public DelimitedDataReader(DiGi.Core.IO.DelimitedData.Enums.DelimitedDataSeparator delimitedDataSeparator, string path, System.Text.Encoding encoding);

Parameters

delimitedDataSeparator DelimitedDataSeparator

The separator to use for delimited data.

path System.String

The path to the file containing the delimited data.

encoding System.Text.Encoding

The encoding to use when reading the file.

DelimitedDataReader(DelimitedDataSeparator, IEnumerable<string>) Constructor

Initializes a new instance of the DelimitedDataReader class.

public DelimitedDataReader(DiGi.Core.IO.DelimitedData.Enums.DelimitedDataSeparator delimitedDataSeparator, System.Collections.Generic.IEnumerable<string> lines);

Parameters

delimitedDataSeparator DelimitedDataSeparator

The separator to use for delimited data.

lines System.Collections.Generic.IEnumerable<System.String>

The collection of lines containing the delimited data.

Properties

DelimitedDataReader.Separator Property

Gets the character used as a separator in the delimited data file.

public char Separator { get; }

Implements Separator

Property Value

System.Char

Methods

DelimitedDataReader.ReadRow() Method

Reads a row of data from a CSV file

public DiGi.Core.IO.DelimitedData.Classes.DelimitedDataRow? ReadRow();

Implements ReadRow()

Returns

DelimitedDataRow
DelimitedDataRow

DelimitedDataReader.ReadRows() Method

Reads a rows of data from a CSV file

public System.Collections.Generic.List<DiGi.Core.IO.DelimitedData.Classes.DelimitedDataRow> ReadRows();

Implements ReadRows()

Returns

System.Collections.Generic.List<DelimitedDataRow>
List of the rows

DelimitedDataRow Class

Class to store one delimited file row

public class DelimitedDataRow : System.Collections.Generic.List<string>

Inheritance System.ObjectSystem.Collections.Generic.List<System.String> → DelimitedDataRow

Constructors

DelimitedDataRow() Constructor

Initializes a new instance of the DelimitedDataRow class.

public DelimitedDataRow();

DelimitedDataRow(IEnumerable<string>) Constructor

Initializes a new instance of the DelimitedDataRow class.

public DelimitedDataRow(System.Collections.Generic.IEnumerable<string>? values);

Parameters

values System.Collections.Generic.IEnumerable<System.String>

The collection of string values to initialize the row with.

Methods

DelimitedDataRow.TryGetValue<T>(int, T) Method

Tries to get the value at the specified index as a specific type.

public bool TryGetValue<T>(int index, out T? value);

Type parameters

T

The type of the value to retrieve.

Parameters

index System.Int32

The zero-based index of the element to get.

value T

When this method returns, contains the value at the specified index if the operation was successful; otherwise, the default value for the type of the element.

Returns

System.Boolean
True if the element is successfully retrieved; otherwise, false.

DelimitedDataWriter Class

Writer for delimited data files.

public class DelimitedDataWriter : System.IO.StreamWriter, DiGi.Core.IO.DelimitedData.Interfaces.IDelimitedDataWriter

Inheritance System.ObjectSystem.MarshalByRefObjectSystem.IO.TextWriterSystem.IO.StreamWriter → DelimitedDataWriter

Implements IDelimitedDataWriter

Constructors

DelimitedDataWriter(char, string) Constructor

Initializes a new instance of the DelimitedDataWriter class.

public DelimitedDataWriter(char separator, string path);

Parameters

separator System.Char

The character to use as a separator.

path System.String

The path to the file where data will be written.

DelimitedDataWriter(char, Stream) Constructor

Initializes a new instance of the DelimitedDataWriter class.

public DelimitedDataWriter(char separator, System.IO.Stream stream);

Parameters

separator System.Char

The character to use as a separator.

stream System.IO.Stream

The stream where data will be written.

DelimitedDataWriter(DelimitedDataSeparator, string) Constructor

Initializes a new instance of the DelimitedDataWriter class.

public DelimitedDataWriter(DiGi.Core.IO.DelimitedData.Enums.DelimitedDataSeparator delimitedDataSeparator, string path);

Parameters

delimitedDataSeparator DelimitedDataSeparator

The separator to use for delimited data.

path System.String

The path to the file where data will be written.

Properties

DelimitedDataWriter.Separator Property

Gets the character used as a separator in the delimited data file.

public char Separator { get; }

Implements Separator

Property Value

System.Char

Methods

DelimitedDataWriter.WriteRow(DelimitedDataRow) Method

Writes a single row to a CSV file.

public void WriteRow(DiGi.Core.IO.DelimitedData.Classes.DelimitedDataRow? delimitedDataRow);

Parameters

delimitedDataRow DelimitedDataRow

The row to be written

Implements WriteRow(DelimitedDataRow)

DelimitedDataWriter.WriteRows(IEnumerable<DelimitedDataRow>) Method

Writes a rows to a CSV file.

public void WriteRows(System.Collections.Generic.IEnumerable<DiGi.Core.IO.DelimitedData.Classes.DelimitedDataRow>? delimitedDataRows);

Parameters

delimitedDataRows System.Collections.Generic.IEnumerable<DelimitedDataRow>

The rows to be written

Implements WriteRows(IEnumerable<DelimitedDataRow>)

Clone this wiki locally