internal virtual bool ProcessHistory(System.Action <HEvents.HEvent> processor)
 {
     lock (this)
     {
         HEvents.HEvent events = _history.getAndSet(null);
         if (events == null)
         {
             return(false);
         }
         events = HEvents.HEvent.Reverse(events);
         while (events != null)
         {
             processor(events);
             events = events.Prev;
         }
         return(true);
     }
 }
 internal virtual E Add <E>(E @event) where E : HEvents.HEvent
 {
     HEvents.HEvent prev = _history.getAndSet(@event);
     @event.Prev = prev == null ? HEvents.HEvent.end : prev;
     return(@event);
 }