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