Exemple #1
0
 /// <summary>
 /// 一般构造
 ///     独立运行模式使用
 /// </summary>
 /// <param name="aqiManage"></param>
 /// <param name="listSrcUrl"></param>
 /// <param name="name">名称一般同 数据源tag</param>
 public AqiRunner(AqiManage aqiManage, List<ISrcUrl> listSrcUrl, string name)
 {
     this.name = name;
     this.dictTimer = SrcUrlGroupTimer.CreateList(listSrcUrl, new Action<object, ElapsedEventArgs>(this.timer_RunEvent));
     this.ias = aqiManage.AqiSave;
     this.an = aqiManage.AqiNote;
     this.ar = aqiManage.AqiRetry;
     this.thisLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
 }
Exemple #2
0
        private ReaderWriterLockSlim thisLock; //读写锁

        #endregion Fields

        #region Constructors

        /// <summary>
        /// 默认构造
        ///     合并运行模式使用
        /// </summary>
        /// <param name="manage"></param>
        /// <param name="listSrcUrl"></param>
        public AqiRunner(AqiManage manage, List<ISrcUrl> listSrcUrl)
        {
            this.name = "DefaultRunner";
            this.dictTimer = SrcUrlGroupTimer.CreateList(listSrcUrl, new Action<object, System.Timers.ElapsedEventArgs>(this.timer_RunEvent));
            this.ias = manage.AqiSave;
            this.an = manage.AqiNote;
            this.ar = manage.AqiRetry;
            this.thisLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
        }
Exemple #3
0
 /// <summary>
 /// 一般构造
 ///     独立运行模式使用
 /// </summary>
 /// <param name="aqiManage"></param>
 /// <param name="listSrcUrl"></param>
 /// <param name="name">名称一般同 数据源tag</param>
 public AqiRunner(AqiManage aqiManage, List <ISrcUrl> listSrcUrl, string name)
 {
     this.name      = name;
     this.dictTimer = SrcUrlGroupTimer.CreateList(listSrcUrl, new Action <object, ElapsedEventArgs>(this.timer_RunEvent));
     this.ias       = aqiManage.AqiSave;
     this.an        = aqiManage.AqiNote;
     this.ar        = aqiManage.AqiRetry;
     this.thisLock  = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
 }
Exemple #4
0
        private ReaderWriterLockSlim thisLock;                   //读写锁

        #endregion

        #region 构造

        /// <summary>
        /// 默认构造
        ///     合并运行模式使用
        /// </summary>
        /// <param name="manage"></param>
        /// <param name="listSrcUrl"></param>
        public AqiRunner(AqiManage manage, List <ISrcUrl> listSrcUrl)
        {
            this.name      = "DefaultRunner";
            this.dictTimer = SrcUrlGroupTimer.CreateList(listSrcUrl, new Action <object, System.Timers.ElapsedEventArgs>(this.timer_RunEvent));
            this.ias       = manage.AqiSave;
            this.an        = manage.AqiNote;
            this.ar        = manage.AqiRetry;
            this.thisLock  = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
        }
Exemple #5
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void init()
 {
     try
     {
         Remind.Log_Info(Plugin.GetInfo(), tag);
         this.aqiNoter   = new AqiNoter(this);
         this.aqiRetryer = new AqiRetryer(this);
         this.initSaver();
         this.initRunner();
     }
     catch (Exception ex)
     {
         Remind.Log_Error("初始化失败", ex, tag);
     }
 }
Exemple #6
0
 /// <summary>
 /// 初始化
 /// </summary>
 private void init()
 {
     try
     {
         Remind.Log_Info(Plugin.GetInfo(), tag);
         this.aqiNoter = new AqiNoter(this);
         this.aqiRetryer = new AqiRetryer(this);
         this.initSaver();
         this.initRunner();
     }
     catch(Exception ex)
     {
         Remind.Log_Error("初始化失败", ex, tag);
     }
 }