internal PHmiBase( INotificationReporterFactory reporterFactory, IServiceClientFactory clientFactory, ICyclicRunnerFactory cyclicRunnerFactory, IPHmiRunTargetFactory pHmiRunTargetFactory, ITimeService timeService, ITimerService timerService, IEventRunTarget beforeUpdateRunTarget, IUpdateStatusRunTargetFactory updateStatusRunTargetFactory, IUsersRunTarget usersRunTarget, ITagServiceFactory tagServiceFactory, IAlarmServiceFactory alarmServiceFactory, ITrendsServiceFactory trendsServiceFactory, ILogService logService, IEventRunTarget afterUpdateRunTarget) { _timeService = timeService; _timerService = timerService; _timerService.Elapsed += TimerServiceElapsed; _reporter = reporterFactory.Create(timeService); _clientFactory = clientFactory; beforeUpdateRunTarget.Runned += BeforeUpdateRunTargetRunned; IUpdateStatusRunTarget updateStatusRunTarget = updateStatusRunTargetFactory.Create(_timeService); _users = new Users.Users(usersRunTarget); _tagService = tagServiceFactory.Create(_reporter); _alarmService = alarmServiceFactory.Create(_reporter); _trendsService = trendsServiceFactory.Create(_reporter); _logService = logService; _commonAlarmCategory = new AlarmCategoryBase(0, "CommonAlarms", () => Res.CommonAlarmsDescription); Add(_commonAlarmCategory); _cyclicRunnerFactory = cyclicRunnerFactory; afterUpdateRunTarget.Runned += AfterUpdateRunTargetRunned; _pHmiRunTarget = pHmiRunTargetFactory.Create( _reporter, _clientFactory, beforeUpdateRunTarget, updateStatusRunTarget, usersRunTarget, _tagService, _alarmService, _trendsService, _logService, afterUpdateRunTarget); _cyclicRunner = _cyclicRunnerFactory.Create(_pHmiRunTarget); IoDevices = new ReadOnlyCollection <IoDeviceAbstract>(_ioDevices); }
protected override void EstablishContext() { base.EstablishContext(); UsersRunTarget = new UsersRunTarget(); }
internal Users(IUsersRunTarget usersRunTarget) { _usersRunTarget = usersRunTarget; }