private QvxTable BuildSingleTable(QvxConnection connection, string tableID, string tableName) { QvxFieldsWrapper fields = GetFields(connection, tableID); if (fields.GetLength() == 0) { QvxLog.Log(QvxLogFacility.Application, QvxLogSeverity.Notice, "No fields were found for table '" + tableName + "'."); return(null); } QvxTable.GetRowsHandler handler = () => { return(GetData(connection, fields, tableID)); }; return(new QvxTable() { TableName = tableName, Fields = fields.Fields, GetRows = handler }); }
private List <QvxTable> BuildTablesSync(QvxConnection connection, IDictionary <string, string> tableDictionary) { List <QvxTable> newTables = new List <QvxTable>(tableDictionary.Select(table => { QvxFieldsWrapper fields = GetFields(connection, table.Key); if (fields.GetLength() == 0) { return(null); } QvxTable.GetRowsHandler handler = () => { return(GetData(connection, fields, table.Key)); }; return(new QvxTable() { TableName = table.Value, Fields = fields.Fields, GetRows = handler }); }).Where(t => t != null && t.Fields.Length != 0) ); return(newTables); }