コード例 #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
        public static void PublishDynamic(this IDispatcherEventPublisher publisher, IEvent @event, long seq = -1)
        {
            var publish = publisher.GetType().GetMethod("Publish").MakeGenericMethod(@event.GetType());

            publish.Invoke(publisher, new object[] { @event, seq, true });
        }
コード例 #3
0
ファイル: Repository.cs プロジェクト: vikavisoft/lacjam
 public Repository(IEventStore eventStore, IDispatcherEventPublisher publisher)
 {
     _eventStore = eventStore;
     _publisher  = publisher;
 }