private void OnEnterExitEventDetected(object sender, EnterExitEventDetectedArgs e)
        {
            var detectedEvent = e.Event;

            ActiveEvents.Add(detectedEvent);
            var timer = new Timer(5000)
            {
                AutoReset = false,
                Enabled   = true
            };

            timer.Elapsed += (o, args) =>
            {
                Deactivate(o, args, detectedEvent);
            };
            ScheduledDeactivationsCount++;

            EnterExitEventsUpdated?.Invoke(this, new EnterExitEventsUpdatedEventArgs(ActiveEvents));
        }
 public void Deactivate(object o, ElapsedEventArgs args, EnterExitEvent ae)
 {
     ScheduledDeactivationsCount--;
     ActiveEvents.Remove(ae);
     EnterExitEventsUpdated?.Invoke(this, new EnterExitEventsUpdatedEventArgs(ActiveEvents));
 }