예제 #1
0
        public ArchiveControl(ArchiveConfig cfg, ArchiveControl.ArchiveTypeEnum type)
            : this()
        {
            ArchiveControl ctl = this;

            ctl.ArchiveType = type;
            ctl.TablePath = cfg.FullTablePath;
            ctl.mArchiveConfg = cfg;

            if (type == ArchiveControl.ArchiveTypeEnum.Record) {
                ctl.ArchiveMethodType = cfg.RecordArchiveMethodType;
                ctl.ArchiveInfo = cfg.RecordArchiveInfo;
                ctl.IsCompressed = cfg.IsRecordCompressed;
                ctl.IsSqueezed = cfg.IsRecordSqueezed;
            } else {
                ctl.ArchiveMethodType = cfg.ColumnArchiveMethodType;
                ctl.ArchiveInfo = cfg.ColumnArchiveInfo;
                ctl.IsCompressed = cfg.IsColumnCompressed;
                ctl.IsSqueezed = cfg.IsColumnSqueezed;
            }
        }
예제 #2
0
 public static void CacheCB(DataTable dt)
 {
     mCache.Clear();
     foreach (DataRow r in dt.Rows) {
         ArchiveConfig ac = new ArchiveConfig();
         ac.Load(r);
         mCache[ac.FullTablePath.ToLower()] = ac;
     }
 }