Exemple #1
0
 public void Handle(AlarmItem message)
 {
     if (!message.Value)
     {
         if (AlarmList.Any(x => x.Address == message.Address))
         {
             var a = AlarmList.Where(x => x.Address == message.Address);
             foreach (var v in a)
             {
                 AlarmList.Remove(v);
             }
         }
     }
     else
     {
         AlarmList.Add(message);
     }
 }
Exemple #2
0
 private List <Alarm> GetIntervalAlarms(int id)
 {
     //Returns a list of all alarms that are created as interval alarms
     SortAlarms();
     return(AlarmList.Where(alarm => alarm.PartOfIntervalSet && alarm.IntervalSetId == id).ToList());
 }