예제 #1
0
 public static void Trigger(Alarm alarm)
 {
     if (alarm.TimeCriterias.All(IsSatisfied))
     {
         AlarmService.TriggerAlarm(alarm.Nested1);
     }
 }
 public static void Trigger(Alarm alarm)
 {
     if (CriteriaAreSatisfied(alarm))
     {
         AlarmService.TriggerAlarm(alarm.Nested1);
     }
 }
예제 #3
0
 public static void Dump(Alarm alarm)
 {
     Console.WriteLine("{ Both: ");
     AlarmService.Dump(alarm.Nested1);
     AlarmService.Dump(alarm.Nested2);
     Console.WriteLine("} ");
 }
예제 #4
0
 public static void Dump(Alarm alarm)
 {
     Console.WriteLine("{ Timed Alarm active when: ");
     OutputCriterias(alarm);
     Console.WriteLine("When triggered : ");
     AlarmService.Dump(alarm.Nested1);
     Console.WriteLine(" }");
 }
예제 #5
0
 public static void Disable(Alarm alarm)
 {
     AlarmService.DisableAlarm(alarm.Nested1);
 }
예제 #6
0
 public static void Trigger(Alarm alarm)
 {
     AlarmService.TriggerAlarm(alarm.Nested1);
     AlarmService.TriggerAlarm(alarm.Nested2);
 }