public Template(string name) : base() { var table = TABLES.NONE; Enum.TryParse(name, out table); Table = table; Name = name; }
static int EntryPoint() { // Create and start the thread for receiving and parsing the tuple RX rx = new RX(); Thread rxTh = new Thread(new ThreadStart(rx.start_rx)); rxTh.Start(); TIMER timer = new TIMER(); Thread timerTh = new Thread(new ThreadStart(timer.start_timer)); timerTh.Start(); TABLES tables = new TABLES(); tables.reset_tables(); Thread bw_tmpTh = new Thread(new ThreadStart(tables.update_bw_tmp)); bw_tmpTh.Start(); Thread tablesTh = new Thread(new ThreadStart(tables.update_tables)); tablesTh.Start(); while (true) { if (rst | clear) { timer.reset_timer(); tables.reset_raw_entry(); tables.reset_bw_tmp(); tables.reset_total_entries(); } Kiwi.Pause(); } return(0); }
private static TableMetadata ParseTable(DatabaseMetadata database, information_schema information_Schema, TABLES dbTables) { var table = new TableMetadata(); table.Database = database; table.DbName = dbTables.TABLE_NAME; table.Type = dbTables.TABLE_TYPE == "BASE TABLE" ? TableType.Table : TableType.View; table.Model = new ModelMetadata { CsTypeName = dbTables.TABLE_NAME, Table = table }; table.Columns = information_Schema .COLUMNS.Where(x => x.TABLE_SCHEMA == database.Name && x.TABLE_NAME == table.DbName) .AsEnumerable() .Select(x => ParseColumn(table, x)) .ToList(); return(table); }