Esempio n. 1
0
        private void CheckForDetectorOnBeforeStart(SplitFailOptions options,
                                                   IControllerEventLogRepository controllerEventsRepository, Models.Detector detector)
        {
            var eventOnBeforeStart = controllerEventsRepository.GetFirstEventBeforeDateByEventCodeAndParameter(
                options.SignalID,
                detector.DetChannel, 81, options.StartDate);
            var eventOffBeforeStart = controllerEventsRepository.GetFirstEventBeforeDateByEventCodeAndParameter(
                options.SignalID,
                detector.DetChannel, 82, options.StartDate);

            if (eventOnBeforeStart != null && eventOffBeforeStart == null)
            {
                _detectorActivations.Add(new SplitFailDetectorActivation
                {
                    DetectorOn  = options.StartDate,
                    DetectorOff = options.EndDate
                });
            }
        }
 public static void SetRepository(IControllerEventLogRepository newRepository)
 {
     controllerEventLogRepository = newRepository;
 }