Exemple #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));
        }
Exemple #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));
        }
Exemple #3
0
 public TrendsRepositoryFactory(INpgsqlConnectionFactory connectionFactory, int categoryId,
                                IEnumerable <int> trendTagIds)
 {
     _connectionFactory = connectionFactory;
     _categoryId        = categoryId;
     _trendTagIds       = trendTagIds;
 }
Exemple #4
0
 public UsersRunner(
     IModelContext context,
     INpgsqlConnectionFactory connectionFactory,
     IUsersRepository repository)
 {
     _context           = context;
     _connectionFactory = connectionFactory;
     _repository        = repository;
 }
Exemple #5
0
 public UsersRunner(
     IModelContext context,
     INpgsqlConnectionFactory connectionFactory,
     IUsersRepository repository)
 {
     _context = context;
     _connectionFactory = connectionFactory;
     _repository = repository;
 }
Exemple #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;
 }
Exemple #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;
 }
Exemple #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;
 }
Exemple #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;
 }
 public TrendsRepositoryFactory(INpgsqlConnectionFactory connectionFactory, int categoryId, IEnumerable<int> trendTagIds)
 {
     _connectionFactory = connectionFactory;
     _categoryId = categoryId;
     _trendTagIds = trendTagIds;
 }