/// <summary> /// Adds a table to this table (omitting key dupes) /// </summary> /// <param name="subtable">A table to add to this table</param> public string AddSubtable(awyTable subtable) { string ret = ""; foreach (var rec in subtable) { try { ret += this.Add(rec.Value); } catch { } } return(ret); }
/// <summary> /// Return an Airway subtable where either start or end ICAO designator matches /// </summary> /// <param name="icao_key">The icao to match</param> /// <returns>An awyTable</returns> public awyTable GetSubtable(string icao_key) { var nT = new awyTable( ); foreach (var rec in this) { // key = ident => "icao_region_icao_region" (so find is Contains(icao), which is expensive...) if (rec.Key.Contains(icao_key)) { nT.Add(rec.Value); } } return(nT); }
/// <summary> /// Create an ICAO table from the given table /// </summary> /// <param name="prefix">The prefix of the table</param> /// <param name="table">The source to fill from</param> public awyTable(awyTable table) { this.AddSubtable(table); }
/// <summary> /// cTor: init the database /// </summary> public awyDatabase() { m_db = new awyTable( ); }