Beispiel #1
0
        /// <summary>
        /// 解析表
        /// </summary>
        /// <returns></returns>
        public virtual TwoKeyDictionary <TKeyA, TKeyB, TValue> ParseTable()
        {
            var Data = new TwoKeyDictionary <TKeyA, TKeyB, TValue>();

            foreach (var item in Table.BufferedValues)
            {
                var keyAData = item[KeyA];
                var keyBData = item[KeyB];
                var keyAObj  = ParseKeyA(keyAData);
                var keyBObj  = ParseKeyB(keyBData);
                var val      = RowToValue(item);
                Data.Set(keyAObj, keyBObj, val);
            }
            return(Data);
        }
Beispiel #2
0
 /// <summary>
 /// 在此完成一些初始化工作。主要包括表的解析。
 /// </summary>
 public virtual void Init()
 {
     this.Data = ParseTable();
 }