Пример #1
0
        /// <summary>
        /// 解析一个数据源表
        /// </summary>
        /// <param name="SourceTable"></param>
        /// <param name="lines"></param>
        /// <returns></returns>
        public static Ntrip.SourceTable Parse(string[] lines)
        {
            SourceTable SourceTable = new Ntrip.SourceTable();
            int         i           = 0;

            foreach (var line in lines)
            {
                // if (i < 5) { i++; continue; }//为什么到5呢?直接把以STR开头以前的都给跳过不行么?
                if (line.StartsWith("STR", StringComparison.CurrentCultureIgnoreCase)) //We found a STReam
                {
                    var item = CasterInfo.Parse(line);
                    SourceTable.Add(item);
                }

                i++;
            }
            return(SourceTable);
        }
Пример #2
0
 /// <summary>
 /// 添加一个元数据
 /// </summary>
 /// <param name="prn"></param>
 public void Add(CasterInfo item)
 {
     this.items.Add(item.Name, item);
 }