public AlarmService(IAlarmRepository repository, ITimer checkTimer) { if (repository == null) throw new ArgumentNullException("repository"); if (checkTimer == null) throw new ArgumentNullException("checkTimer"); this.cache = new Dictionary<Guid, IAlarm>(); this.valueComparer = new AlarmEqualityComparer(); this.repository = repository; this.isStoppableRepository = typeof(ISupportsStartStop).IsAssignableFrom(repository.GetType()); this.timer = checkTimer; this.timer.Elapsed += timer_Elapsed; }
public AlarmService(IAlarmRepository repository, ITimer checkTimer) { if (repository == null) { throw new ArgumentNullException("repository"); } if (checkTimer == null) { throw new ArgumentNullException("checkTimer"); } this.cache = new Dictionary <Guid, IAlarm>(); this.valueComparer = new AlarmEqualityComparer(); this.repository = repository; this.isStoppableRepository = typeof(ISupportsStartStop).IsAssignableFrom(repository.GetType()); this.timer = checkTimer; this.timer.Elapsed += timer_Elapsed; }