Table of Contents

Class ResultTable

Namespace
EpNet.Results
Assembly
EpNet.dll
public class ResultTable
Inheritance
ResultTable
Extension Methods

Properties

Header

Stores the header of each column.

public List<string> Header { get; set; }

Property Value

List<string>

List of headers.

this[int]

Gets a table numeric column by its zero-based position.

public IEnumerable<double> this[int column] { get; }

Parameters

column int

Zero-based position

Property Value

IEnumerable<double>

Result column.

this[string]

Gets a table numeric column by its header.

public IEnumerable<double> this[string column] { get; }

Parameters

column string

Column header

Property Value

IEnumerable<double>

Result column.

Rows

Stores the rows.

public List<List<string>> Rows { get; set; }

Property Value

List<List<string>>

List of rows (as list of strings).

Methods

Compare(ResultTable)

Returns a text specifying how the tables are different. Empty if equal.

public string Compare(ResultTable table)

Parameters

table ResultTable

Table to compare with.

Returns

string

Text message on how the tables are different.

Equals(ResultTable)

Determines whether 2 tables are equal.

public bool Equals(ResultTable table)

Parameters

table ResultTable

Returns

bool

true if the tables are equal; otherwise, false.

Get(int, int)

Get text value from a row and header positions.

public double Get(int rowNumber, int columnNumber)

Parameters

rowNumber int

Row zero-based position.

columnNumber int

Column zero-based position.

Returns

double

Text value.

Get(int, string)

Get numeric value from a row position and header name

public double Get(int rowNumber, string columnHeader)

Parameters

rowNumber int

Row zero-based position.

columnHeader string

Column header name.

Returns

double

Numeric value.

Get(string, int)

Get numeric value from a row header and column position.

public double Get(string rowHeader, int columnNumber)

Parameters

rowHeader string

Row zero-based position.

columnNumber int

Column zero-based position.

Returns

double

Numeric value.

Get(string, string)

Get numeric value from a row header and column header name.

public double Get(string rowHeader, string columnHeader)

Parameters

rowHeader string

Row header name.

columnHeader string

Column header name.

Returns

double

Numeric value.

GetColumn(int)

Gets a table numeric column by its zero-based position. Non-numeric values (blank,-, etc) are returned as 0.

public IEnumerable<double> GetColumn(int column)

Parameters

column int

Zero-based position

Returns

IEnumerable<double>

Result column.

GetColumn(string)

Gets a table numeric column by its header. Non-numeric values (blank,-, etc) are returned as 0.

public IEnumerable<double> GetColumn(string column)

Parameters

column string

Column header

Returns

IEnumerable<double>

Result column.

GetData(int, int)

Gets a Dictionary from a result table with a specified column as string Keys and a specified column as numeric Values. Non-numeric values (blank,-, etc) are returned as 0.

public Dictionary<string, double> GetData(int componentColumn, int valueColumn)

Parameters

componentColumn int

Zero-based column position for generating the Keys

valueColumn int

Zero-based column position for generating the Values

Returns

Dictionary<string, double>

A Dictionary with Keys from column 1 and Values from column 2

GetData(int, string)

Gets a Dictionary from a result table with a specified column as string Keys and a specified column as numeric Values. Non-numeric values (blank,-, etc) are returned as 0.

public Dictionary<string, double> GetData(int componentColumn, string valueColumn)

Parameters

componentColumn int

Zero-based column position for generating the Keys

valueColumn string

Column header for generating the Values

Returns

Dictionary<string, double>

A Dictionary with Keys from column 1 and Values from column 2

GetData(string, int)

Gets a Dictionary from a result table with a specified column as string Keys and a specified column as numeric Values. Non-numeric values (blank,-, etc) are returned as 0.

public Dictionary<string, double> GetData(string componentColumn, int valueColumn)

Parameters

componentColumn string

Column header for generating the Keys

valueColumn int

Zero-based column position for generating the Values

Returns

Dictionary<string, double>

A Dictionary with Keys from column 1 and Values from column 2

GetData(string, string)

Gets a Dictionary from a result table with a specified column as string Keys and a specified column as numeric Values. Non-numeric values (blank,-, etc) are returned as 0.

public Dictionary<string, double> GetData(string componentColumn, string valueColumn)

Parameters

componentColumn string

Column header for generating the Keys

valueColumn string

Column header for generating the Values

Returns

Dictionary<string, double>

A Dictionary with Keys from column 1 and Values from column 2

GetData<T>(int, int)

Gets a Dictionary from a result table with a specified column as string Keys and a specified column as T Values. Blank cells are not returned.

public Dictionary<string, T> GetData<T>(int componentColumn, int valueColumn)

Parameters

componentColumn int

Zero-based column position for generating the Keys

valueColumn int

Zero-based column position for generating the Values

Returns

Dictionary<string, T>

A Dictionary with Keys from column 1 and Values from column 2

Type Parameters

T

double or string

GetData<T>(int, string)

Gets a Dictionary from a result table with a specified column as string Keys and a specified column as T Values. Blank cells are not returned.

public Dictionary<string, T> GetData<T>(int componentColumn, string valueColumn)

Parameters

componentColumn int

Zero-based column position for generating the Keys

valueColumn string

Column header for generating the Values

Returns

Dictionary<string, T>

A Dictionary with Keys from column 1 and Values from column 2

Type Parameters

T

double or string

GetData<T>(string, int)

Gets a Dictionary from a result table with a specified column as string Keys and a specified column as T Values. Blank cells are not returned.

public Dictionary<string, T> GetData<T>(string componentColumn, int valueColumn)

Parameters

componentColumn string

Column header for generating the Keys

valueColumn int

Zero-based column position for generating the Values

Returns

Dictionary<string, T>

A Dictionary with Keys from column 1 and Values from column 2

Type Parameters

T

double or string

GetData<T>(string, string)

Gets a Dictionary from a result table with a specified column as string Keys and a specified column as T Values. Blank cells are not returned.

public Dictionary<string, T> GetData<T>(string componentColumn, string valueColumn)

Parameters

componentColumn string

Column header for generating the Keys

valueColumn string

Column header for generating the Values

Returns

Dictionary<string, T>

A Dictionary with Keys from column 1 and Values from column 2

Type Parameters

T

double or string

GetText(int, int)

Get text value from a row and header positions.

public string GetText(int rowNumber, int columnNumber)

Parameters

rowNumber int

Row zero-based position.

columnNumber int

Column zero-based position.

Returns

string

Text value.

GetText(int, string)

Get text value from a row position and header name

public string GetText(int rowNumber, string columnHeader)

Parameters

rowNumber int

Row zero-based position.

columnHeader string

Column header name.

Returns

string

Text value.

GetText(string, int)

Get text value from a row header and column position.

public string GetText(string rowHeader, int columnNumber)

Parameters

rowHeader string

Row zero-based position.

columnNumber int

Column zero-based position.

Returns

string

Text value.

GetText(string, string)

Get text value from a row header and column header name.

public string GetText(string rowHeader, string columnHeader)

Parameters

rowHeader string

Row header name.

columnHeader string

Column header name.

Returns

string

Text value.

GetTextColumn(int)

Gets a table text column by its zero-based position.

public IEnumerable<string> GetTextColumn(int column)

Parameters

column int

Zero-based position

Returns

IEnumerable<string>

Result column.

GetTextColumn(string)

Gets a table text column by its header. Blank cells are not returned.

public IEnumerable<string> GetTextColumn(string column)

Parameters

column string

Column header

Returns

IEnumerable<string>

Result column.

Operators

operator ==(ResultTable, ResultTable)

Determines whether 2 tables are different.

public static bool operator ==(ResultTable a, ResultTable b)

Parameters

a ResultTable

First table to compare

b ResultTable

Second string to compare.

Returns

bool

true if the tables are different; otherwise, false.

operator !=(ResultTable, ResultTable)

Determines whether 2 tables are equal.

public static bool operator !=(ResultTable a, ResultTable b)

Parameters

a ResultTable

First table to compare

b ResultTable

Second string to compare.

Returns

bool

true if the tables are equal; otherwise, false.