Пример #1
0
        /// <summary>
        /// Return an Airport subtable where airport_runwy key matches
        /// /// </summary>
        /// <param name="icao_key">The ICAO name of runways to select</param>
        /// <returns>A table with selected records</returns>
        public aptTable GetSubtable(string icao_key)
        {
            var l = this.Where(x => x.Key == icao_key);

            var t = new aptTable( );

            foreach (var kv in l)
            {
                t.Add(kv.Key, kv.Value);
            }
            return(t);
        }
Пример #2
0
        /// <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(aptTable subtable)
        {
            string ret = "";

            foreach (var rec in subtable)
            {
                try {
                    ret += this.Add(rec.Value);
                }
                catch { }
            }
            return(ret);
        }
Пример #3
0
 /// <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 aptTable(aptTable table)
 {
     this.AddSubtable(table);
 }
Пример #4
0
 /// <summary>
 /// cTor: init the database
 /// </summary>
 public aptDatabase()
 {
     m_db = new aptTable( );
 }