コード例 #1
0
ファイル: FrmBasicEAO.cs プロジェクト: RapidScada/scada-v6
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public FrmBasicEAO(AppDirs appDirs, ArchiveConfig archiveConfig)
     : this()
 {
     this.appDirs       = appDirs ?? throw new ArgumentNullException(nameof(appDirs));
     this.archiveConfig = archiveConfig ?? throw new ArgumentNullException(nameof(archiveConfig));
     options            = new BasicEAO(archiveConfig.CustomOptions);
 }
コード例 #2
0
ファイル: BasicEAL.cs プロジェクト: wuchang/scada-v6
        private EventTable lastTable;                                   // the last accessed event table


        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public BasicEAL(IArchiveContext archiveContext, ArchiveConfig archiveConfig, int[] cnlNums)
            : base(archiveContext, archiveConfig, cnlNums)
        {
            options     = new BasicEAO(archiveConfig.CustomOptions);
            appLog      = archiveContext.Log;
            arcLog      = options.LogEnabled ? CreateLog(ModuleUtils.ModuleCode) : null;
            stopwatch   = new Stopwatch();
            adapter     = new EventTableAdapter();
            archivePath = Path.Combine(archiveContext.AppConfig.PathOptions.GetArcDir(options.IsCopy), Code);
            tableCache  = new MemoryCache <DateTime, EventTable>(ModuleUtils.CacheExpiration, ModuleUtils.CacheCapacity);

            currentTable = null;
            lastTable    = null;
        }
コード例 #3
0
ファイル: BasicEAL.cs プロジェクト: RapidScada/scada-v6
        private EventTable lastTable;                                   // the last accessed event table


        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public BasicEAL(IArchiveContext archiveContext, ArchiveConfig archiveConfig, int[] cnlNums,
                        ModuleConfig moduleConfig) : base(archiveContext, archiveConfig, cnlNums)
        {
            this.moduleConfig = moduleConfig ?? throw new ArgumentNullException(nameof(moduleConfig));
            options           = new BasicEAO(archiveConfig.CustomOptions);
            appLog            = archiveContext.Log;
            arcLog            = options.LogEnabled ? CreateLog(ModuleUtils.ModuleCode) : null;
            stopwatch         = new Stopwatch();
            adapter           = new EventTableAdapter();
            tableCache        = new MemoryCache <DateTime, EventTable>(ModuleUtils.CacheExpiration, ModuleUtils.CacheCapacity);

            archivePath  = "";
            currentTable = null;
            lastTable    = null;
        }