Example #1
0
        public AlarmsRunTarget(
            AlarmCategory alarmCategory,
            INotificationReporter reporter,
            IAlarmsRepository repository,
            IProject project,
            ITimeService timeService,
            INpgsqlConnectionFactory connectionFactory)
        {
            _name              = string.Format("{0} \"{1}\"", Res.Alarms, alarmCategory.Name);
            _reporter          = reporter;
            _timeService       = timeService;
            _repository        = repository;
            _project           = project;
            _connectionFactory = connectionFactory;
            if (alarmCategory.TimeToStoreDb.HasValue)
            {
                _timeToStore = new TimeSpan(alarmCategory.TimeToStoreDb.Value);
            }

            _alarmDigitalValues = new Dictionary <int, AlarmStatus>(alarmCategory.AlarmTags.Count);
            foreach (var t in alarmCategory.AlarmTags)
            {
                _alarmDigitalValues.Add(t.Id, new AlarmStatus(t.Acknowledgeable));
                _alarmPrivileges.Add(t.Id, t.Privilege);
            }

            _updateAlarmTagsDigitalValues = () => UpdateAlarmDigitalValues(GetIoDeviceGroups(alarmCategory));
        }
Example #2
0
        public AlarmsRunTarget(
            AlarmCategory alarmCategory,
            INotificationReporter reporter,
            IAlarmsRepository repository,
            IProject project,
            ITimeService timeService,
            INpgsqlConnectionFactory connectionFactory)
        {
            _name = string.Format("{0} \"{1}\"", Res.Alarms, alarmCategory.Name);
            _reporter = reporter;
            _timeService = timeService;
            _repository = repository;
            _project = project;
            _connectionFactory = connectionFactory;
            if (alarmCategory.TimeToStoreDb.HasValue)
            {
                _timeToStore = new TimeSpan(alarmCategory.TimeToStoreDb.Value);
            }

            _alarmDigitalValues = new Dictionary<int, AlarmStatus>(alarmCategory.AlarmTags.Count);
            foreach (var t in alarmCategory.AlarmTags)
            {
                _alarmDigitalValues.Add(t.Id, new AlarmStatus(t.Acknowledgeable));
                _alarmPrivileges.Add(t.Id, t.Privilege);
            }

            _updateAlarmTagsDigitalValues = () => UpdateAlarmDigitalValues(GetIoDeviceGroups(alarmCategory));
        }
Example #3
0
 public TrendsRepositoryFactory(INpgsqlConnectionFactory connectionFactory, int categoryId,
                                IEnumerable <int> trendTagIds)
 {
     _connectionFactory = connectionFactory;
     _categoryId        = categoryId;
     _trendTagIds       = trendTagIds;
 }
Example #4
0
 public UsersRunner(
     IModelContext context,
     INpgsqlConnectionFactory connectionFactory,
     IUsersRepository repository)
 {
     _context           = context;
     _connectionFactory = connectionFactory;
     _repository        = repository;
 }
Example #5
0
 public UsersRunner(
     IModelContext context,
     INpgsqlConnectionFactory connectionFactory,
     IUsersRepository repository)
 {
     _context = context;
     _connectionFactory = connectionFactory;
     _repository = repository;
 }
Example #6
0
 public LogMaintainer(
     logs log,
     ILogRepository repository,
     ITimeService timeService,
     INpgsqlConnectionFactory connectionFactory)
 {
     _repository        = repository;
     _timeService       = timeService;
     _connectionFactory = connectionFactory;
     _timeToStore       = log.time_to_store.HasValue ? new TimeSpan(log.time_to_store.Value) as TimeSpan? : null;
 }
Example #7
0
 public LogMaintainer(
     PHmiModel.Entities.Log log,
     ILogRepository repository,
     ITimeService timeService,
     INpgsqlConnectionFactory connectionFactory)
 {
     _repository        = repository;
     _timeService       = timeService;
     _connectionFactory = connectionFactory;
     _timeToStore       = log.TimeToStoreDb.HasValue ? new TimeSpan(log.TimeToStoreDb.Value) as TimeSpan? : null;
 }
Example #8
0
 public LogMaintainer(
     PHmiModel.Entities.Log log,
     ILogRepository repository,
     ITimeService timeService,
     INpgsqlConnectionFactory connectionFactory)
 {
     _repository = repository;
     _timeService = timeService;
     _connectionFactory = connectionFactory;
     _timeToStore = log.TimeToStoreDb.HasValue ? new TimeSpan(log.TimeToStoreDb.Value) as TimeSpan? : null;
 }
Example #9
0
 public LogMaintainer(
     logs log,
     ILogRepository repository,
     ITimeService timeService,
     INpgsqlConnectionFactory connectionFactory)
 {
     _repository = repository;
     _timeService = timeService;
     _connectionFactory = connectionFactory;
     _timeToStore = log.time_to_store.HasValue ? new TimeSpan(log.time_to_store.Value) as TimeSpan? : null;
 }
Example #10
0
 public TrendsRepositoryFactory(INpgsqlConnectionFactory connectionFactory, int categoryId, IEnumerable<int> trendTagIds)
 {
     _connectionFactory = connectionFactory;
     _categoryId = categoryId;
     _trendTagIds = trendTagIds;
 }