Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ESightSyncInstance"/> class.
        /// </summary>
        /// <param name="eSight">
        /// The e sight.
        /// </param>
        public ESightSyncInstance(HWESightHost eSight)
        {
            logger             = new ESightLogger(eSight.HostIP);
            this.IsRunning     = true;
            this.Session       = new ESightSession(eSight);
            this.UpdateDnTasks = new List <UpdateDnTask>();
            this.LastAliveTime = DateTime.Now;
            this.alarmQueue    = new Queue <AlarmData>();
            this.StartAlarmEventProcessor();
            this.StartNeDeviceEventProcessor();
            this.StartKeepAliveJob();
            this.pluginConfig = ConfigHelper.GetPluginConfig();
            var scheduler = new LimitedConcurrencyLevelTaskScheduler(pluginConfig.ThreadCount);

            taskFactory = new TaskFactory(cts.Token, TaskCreationOptions.HideScheduler, TaskContinuationOptions.HideScheduler, scheduler);
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ESightSession"/> class.
 /// </summary>
 /// <param name="eSight">The e sight.</param>
 public ESightSession(HWESightHost eSight)
 {
     this.ESight = eSight;
     logger      = new ESightLogger(eSight.HostIP);
 }