/// <summary> /// Determines whether the specified QKeyedTable is equal to the current QKeyedTable. /// </summary> /// <param name="kt">The QKeyedTable to compare with the current QKeyedTable.</param> /// <returns>true if the specified QKeyedTable is equal to the current QKeyedTable; otherwise, false</returns> public bool Equals(QKeyedTable kt) { if (kt == null) { return(false); } return(Keys.Equals(kt.Keys) && Values.Equals(kt.Values)); }
//-------------------------------------------------------------------// private static object[,] QKeyedTable2Excel(QKeyedTable table) { var res = new object[table.Values.RowsCount + 1, table.Values.ColumnsCount + table.Keys.ColumnsCount]; for (var i = 0; i < table.Keys.ColumnsCount + table.Values.ColumnsCount; i++) for (var j = 0; j < table.Values.RowsCount + 1; j++) { if (j == 0) //write colnames { res[j, i] = (i < table.Keys.ColumnsCount) ? table.Keys.Columns.GetValue(i).ToString() : table.Values.Columns.GetValue(i - table.Keys.ColumnsCount).ToString(); } else //write data { res[j, i] = (i < table.Keys.ColumnsCount) ? Convert2Excel(((Array) table.Keys.Data.GetValue(i)).GetValue(j - 1)) : Convert2Excel( ((Array) table.Values.Data.GetValue(i - table.Keys.ColumnsCount)).GetValue( j - 1)); } } return res; }
public QKeyedTableEnumerator(QKeyedTable table) { _kt = table; }
/// <summary> /// Initializes a new instance of the KeyValuePair. /// </summary> public KeyValuePair(QKeyedTable table, int index) { _kt = table; _index = index; }
/// <summary> /// Determines whether the specified QKeyedTable is equal to the current QKeyedTable. /// </summary> /// <param name="kt">The QKeyedTable to compare with the current QKeyedTable.</param> /// <returns>true if the specified QKeyedTable is equal to the current QKeyedTable; otherwise, false</returns> public bool Equals(QKeyedTable kt) { if (kt == null) { return false; } return Keys.Equals(kt.Keys) && Values.Equals(kt.Values); }
private void WriteKeyedTable(QKeyedTable kt) { _writer.Write((sbyte)QType.KeyedTable); WriteObject(kt.Keys); WriteObject(kt.Values); }
private void WriteKeyedTable(QKeyedTable kt) { writer.Write((sbyte)QType.KeyedTable); WriteObject(kt.Keys); WriteObject(kt.Values); }
public QKeyedTableEnumerator(QKeyedTable table) { _kt = table; _current = new KeyValuePair(_kt, _index); }
/// <summary> /// Initializes a new instance of the KeyValuePair. /// </summary> public KeyValuePair(QKeyedTable table, int index) : this() { _kt = table; Index = index; }