Beispiel #1
0
 protected internal override bool IsSameSourceInternal(BoldBaseEvent boldEvent)
 {
     if (string.IsNullOrEmpty(SensorId))
     {
         throw new NullReferenceException("Not initialized, yet");
     }
     if (!(boldEvent is GuardEvent))
     {
         return(false);
     }
     return(SensorId.Equals(((GuardEvent)boldEvent).SensorId));
 }
        private IEnumerable <BoldBaseEvent> GetBoldEvents(string data)
        {
            List <BoldBaseEvent> boldEvents = new List <BoldBaseEvent>();

            using (BoldEventsStreamReader eventReader = new BoldEventsStreamReader(data))
            {
                Dictionary <string, string> values = eventReader.GetNextEvent();
                while (values != null)
                {
                    BoldBaseEvent boldEvent = BoldBaseEvent.CreateEvent(values);
                    boldEvents.Add(boldEvent);
                    values = eventReader.GetNextEvent();
                }
            }
            return(boldEvents);
        }
 protected internal override bool HasEventValueChange(BoldBaseEvent boldEvent)
 {
     return(!((RegistrationEvent)boldEvent).Registered.Equals(Registered));
 }
 protected internal override bool IsSameSourceInternal(BoldBaseEvent boldEvent)
 {
     return(boldEvent is RegistrationEvent);
 }
Beispiel #5
0
 protected internal override bool HasEventValueChange(BoldBaseEvent boldEvent)
 {
     throw new NotImplementedException();
 }
Beispiel #6
0
 protected internal override bool IsSameSourceInternal(BoldBaseEvent boldEvent)
 {
     throw new NotImplementedException();
 }
        internal void OnBoldEvent(BoldBaseEvent boldEvent)
        {
            BoldEventHandlerArgs args = boldEvent.CreateBoldEventHandlerArgs();

            BoldEvent?.Invoke(this, args);
        }
Beispiel #8
0
 protected internal abstract bool HasEventValueChange(BoldBaseEvent boldEvent);
Beispiel #9
0
 protected internal abstract bool IsSameSourceInternal(BoldBaseEvent boldEvent);
Beispiel #10
0
 public bool IsSameSource(BoldBaseEvent boldEvent)
 {
     return(GetType() == boldEvent.GetType() && IsSameSourceInternal(boldEvent));
 }
Beispiel #11
0
 protected internal override bool HasEventValueChange(BoldBaseEvent boldEvent)
 {
     return(!SensorStatus.Equals(((GuardEvent)boldEvent).SensorStatus));
 }