示例#1
0
        public void HandleSequencedEvent(SequencedEvent sequencedEvent, bool?runImmediately = true)
        {
            if (!sequencedEvent.HasEvent())
            {
                return;
            }

            IDispatcherEventPublisher publisher = null;

            _transactor.ApplyTransactionForLambda(() =>
                                                  FinallyGuarded.Apply(() =>
            {
                publisher = DispatcherEventPublisher(sequencedEvent, runImmediately);
                AuditLogStatus(sequencedEvent);
            },
                                                                       () =>
            {
                if (publisher != null)
                {
                    _container.Release(publisher);
                }
            }));
        }
示例#2
0
 private static bool FinishedReplayingEvents(bool exitAtEndOfStream, SequencedEvent sequencedEvent)
 {
     return(exitAtEndOfStream && sequencedEvent != null && !sequencedEvent.HasEvent());
 }