Skip to content

DiGi.Core.IO.DelimitedData

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

DiGi.Core.IO.DelimitedData Namespace

Classes

Create Class

public static class Create

Inheritance System.Object → Create

Methods

Create.Columns(this IEnumerable<string>) Method

Creates a list of columns from string names.

public static System.Collections.Generic.List<DiGi.Core.IO.Table.Classes.Column>? Columns(this System.Collections.Generic.IEnumerable<string>? names);

Parameters

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

The collection of column names to convert.

Returns

System.Collections.Generic.List<Column>
A list of Column objects, or null if the input is null.

Create.Table(string, char, int, int) Method

Creates a Table from a delimited file using a separator character.

public static DiGi.Core.IO.Table.Classes.Table? Table(string? path, char separator, int columnIndex=0, int rowIndex=1);

Parameters

path System.String

The path to the delimited file.

separator System.Char

The character used as a separator in the delimited file.

columnIndex System.Int32

The index of the column to start from. Defaults to 0.

rowIndex System.Int32

The index of the row to start from. Defaults to 1.

Returns

Table
A Table object if successful; otherwise, null.

Create.Table(string, DelimitedDataSeparator, int, int) Method

Creates a Table from a delimited file using a DelimitedDataSeparator enum value.

public static DiGi.Core.IO.Table.Classes.Table? Table(string? path, DiGi.Core.IO.DelimitedData.Enums.DelimitedDataSeparator delimitedDataSeparator, int columnIndex=0, int rowIndex=1);

Parameters

path System.String

The path to the delimited file.

delimitedDataSeparator DelimitedDataSeparator

The separator used in the delimited file.

columnIndex System.Int32

The index of the column to start from. Defaults to 0.

rowIndex System.Int32

The index of the row to start from. Defaults to 1.

Returns

Table
A Table object if successful; otherwise, null.

Create.Table(this IDelimitedDataReader, int, int) Method

Converts DelimitedDataReader to Table

public static DiGi.Core.IO.Table.Classes.Table? Table(this DiGi.Core.IO.DelimitedData.Interfaces.IDelimitedDataReader? delimitedDataReader, int columnIndex=0, int rowIndex=1);

Parameters

delimitedDataReader IDelimitedDataReader

DelimitedDataReader

columnIndex System.Int32

Header index (column names). If data has no header then set to -1

rowIndex System.Int32

Row Index where data starts

Returns

Table

Modify Class

public static class Modify

Inheritance System.Object → Modify

Methods

Modify.Append(string, Table, char, Func<object,string>) Method

Appends a table's data to a delimited file.

public static bool Append(string? path, DiGi.Core.IO.Table.Classes.Table? table, char separator, System.Func<object?,string?>? func=null);

Parameters

path System.String

The path to the delimited file.

table Table

The table containing the data to append.

separator System.Char

The character used as a separator in the delimited file.

func System.Func<System.Object,System.String>

An optional function to convert objects to strings.

Returns

System.Boolean
True if the operation was successful; otherwise, false.

Modify.Read(this Table, IDelimitedDataReader, int, int) Method

Reads delimited data from a reader into a table.

public static bool Read(this DiGi.Core.IO.Table.Classes.Table? table, DiGi.Core.IO.DelimitedData.Interfaces.IDelimitedDataReader? delimitedDataReader, int columnIndex=0, int rowIndex=1);

Parameters

table Table

The table to read the data into.

delimitedDataReader IDelimitedDataReader

The reader used to read the delimited data.

columnIndex System.Int32

The index of the column to start reading from. Defaults to 0.

rowIndex System.Int32

The index of the row to start reading from. Defaults to 1.

Returns

System.Boolean
True if the data was read successfully; otherwise, false.

Modify.Read(this Table, string, char, int, int) Method

Reads delimited data from a file using a separator character into a table.

public static bool Read(this DiGi.Core.IO.Table.Classes.Table? table, string? path, char separator, int columnIndex=0, int rowIndex=1);

Parameters

table Table

The table to read the data into.

path System.String

The path to the file containing the delimited data.

separator System.Char

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

columnIndex System.Int32

The index of the column to start reading from. Defaults to 0.

rowIndex System.Int32

The index of the row to start reading from. Defaults to 1.

Returns

System.Boolean
True if the data was read successfully; otherwise, false.

Modify.Read(this Table, string, DelimitedDataSeparator, int, int) Method

Reads delimited data from a file using a DelimitedDataSeparator enum into a table.

public static bool Read(this DiGi.Core.IO.Table.Classes.Table? table, string? path, DiGi.Core.IO.DelimitedData.Enums.DelimitedDataSeparator delimitedDataSeparator, int columnIndex=0, int rowIndex=1);

Parameters

table Table

The table to read the data into.

path System.String

The path to the file containing the delimited data.

delimitedDataSeparator DelimitedDataSeparator

The separator used in the delimited data file.

columnIndex System.Int32

The index of the column to start reading from. Defaults to 0.

rowIndex System.Int32

The index of the row to start reading from. Defaults to 1.

Returns

System.Boolean
True if the data was read successfully; otherwise, false.

Modify.Write(this Table, IDelimitedDataWriter, Func<object,string>) Method

Writes a table to a delimited data writer.

public static bool Write(this DiGi.Core.IO.Table.Classes.Table? table, DiGi.Core.IO.DelimitedData.Interfaces.IDelimitedDataWriter? delimitedDataWriter, System.Func<object?,string?>? func=null);

Parameters

table Table

The table to write.

delimitedDataWriter IDelimitedDataWriter

The delimited data writer to use.

func System.Func<System.Object,System.String>

An optional function to convert objects to strings.

Returns

System.Boolean
True if the write operation was successful; otherwise, false.

Modify.Write(this Table, string, char, Func<object,string>) Method

Writes a table to a delimited file using a separator character.

public static bool Write(this DiGi.Core.IO.Table.Classes.Table? table, string? path, char separator, System.Func<object?,string?>? func=null);

Parameters

table Table

The table to write.

path System.String

The path where the file will be written.

separator System.Char

The character to use as a separator.

func System.Func<System.Object,System.String>

An optional function to convert objects to strings.

Returns

System.Boolean
True if the write operation was successful; otherwise, false.

Modify.Write(this Table, string, DelimitedDataSeparator, Func<object,string>) Method

Writes a table to a delimited file using a DelimitedDataSeparator enum.

public static bool Write(this DiGi.Core.IO.Table.Classes.Table? table, string? path, DiGi.Core.IO.DelimitedData.Enums.DelimitedDataSeparator delimitedDataSeparator, System.Func<object?,string?>? func=null);

Parameters

table Table

The table to write.

path System.String

The path where the file will be written.

delimitedDataSeparator DelimitedDataSeparator

The separator to use for the delimited data.

func System.Func<System.Object,System.String>

An optional function to convert objects to strings.

Returns

System.Boolean
True if the write operation was successful; otherwise, false.

Query Class

public static class Query

Inheritance System.Object → Query

Methods

Query.Separator(this DelimitedDataSeparator) Method

Gets the character value of a DelimitedDataSeparator enum member.

public static char Separator(this DiGi.Core.IO.DelimitedData.Enums.DelimitedDataSeparator delimitedDataSeparator);

Parameters

delimitedDataSeparator DelimitedDataSeparator

The delimited data separator to get the character value for.

Returns

System.Char
The character representation of the specified delimiter.

Query.Text(this IEnumerable<string>, char) Method

Joins a collection of values into a delimited string.

public static string? Text(this System.Collections.Generic.IEnumerable<string?>? values, char separator);

Parameters

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

The collection of strings to join.

separator System.Char

The character used as the delimiter between strings.

Returns

System.String
A string containing the joined values, or null if the input is null.

Query.Values(this string, char, Func<string>) Method

Parses a delimited line into individual values.

public static System.Collections.Generic.List<string>? Values(this string? line, char separator, System.Func<string>? nextLine=null);

Parameters

line System.String

The string to be parsed.

separator System.Char

The character used as the delimiter.

nextLine System.Func<System.String>

An optional function to retrieve the next line if needed for multi-line parsing.

Returns

System.Collections.Generic.List<System.String>
A list of strings containing the parsed values, or null if the input line is null.

Clone this wiki locally