Search Results for

    Show / Hide Table of Contents

    Class SlimDataTable

    efficient replacement for DataTable.

    Inheritance
    System.Object
    SlimDataTable
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: TimeCockpit.Data.Database
    Assembly: TimeCockpit.Data.dll
    Syntax
    public class SlimDataTable

    Constructors

    SlimDataTable(Dictionary<String, Int32>, Object[][])

    Initializes a new instance of the SlimDataTable class.

    Declaration
    public SlimDataTable(Dictionary<string, int> ordinals, object[][] rows)
    Parameters
    Type Name Description
    System.Collections.Generic.Dictionary<System.String, System.Int32> ordinals

    The ordinals of the table.

    System.Object[][] rows

    The rows of the table.

    Properties

    MaxOrdinal

    Gets the number of columns.

    Declaration
    public int MaxOrdinal { get; }
    Property Value
    Type Description
    System.Int32

    Ordinals

    Gets the ordinals, readonly.

    Declaration
    public IEnumerable<KeyValuePair<string, int>> Ordinals { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Int32>>

    RowCount

    Gets the row count of the table.

    Declaration
    public int RowCount { get; }
    Property Value
    Type Description
    System.Int32

    Rows

    Gets the rows.

    Declaration
    public IEnumerable<object[]> Rows { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Object[]>

    Methods

    GetOrdinal(String)

    Gets the ordinal of a specific column name.

    Declaration
    public int GetOrdinal(string columnName)
    Parameters
    Type Name Description
    System.String columnName

    The name of the column.

    Returns
    Type Description
    System.Int32

    Returns the ordinal of the column.

    GetRow(Int32)

    Gets the row at specified index.

    Declaration
    public object[] GetRow(int index)
    Parameters
    Type Name Description
    System.Int32 index

    The index of the row.

    Returns
    Type Description
    System.Object[]

    Returns the row at given index.

    GetValue(Int32, Int32)

    Gets the value of the table.

    Declaration
    public object GetValue(int row, int ordinal)
    Parameters
    Type Name Description
    System.Int32 row

    The index of the row.

    System.Int32 ordinal

    The column index / ordinal.

    Returns
    Type Description
    System.Object

    Returns the object at the given location.

    GetValue<T>(Int32, Int32)

    Gets the value at the specified location.

    Declaration
    public T GetValue<T>(int row, int ordinal)
    Parameters
    Type Name Description
    System.Int32 row

    the index of the row.

    System.Int32 ordinal

    the ordinal of the column.

    Returns
    Type Description
    T

    Returns the value.

    Type Parameters
    Name Description
    T

    The type of the value.

    In This Article
    Back to top Copyright © 2020 software architects gmbh