Beispiel #1
0
 public EventStreamHandler(IEventExecutor eventExecutor, IEventBus eventBus,
                           IEventPublishedVersionStore eventPublishedVersionStore)
 {
     this._eventExecutor = eventExecutor;
     this._eventBus      = eventBus;
     this._eventPublishedVersionStore = eventPublishedVersionStore;
     this._eventQueue = new ConcurrentQueue <EventStream>();
 }
Beispiel #2
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="EventConsumer" /> class.
        /// </summary>
        public EventConsumer(IMessageBus <ICommand> commandBus,
                             IMessageBus <IEvent> eventBus,
                             IMessageBus <IResult> resultBus,
                             IEventPublishedVersionStore publishedVersionStore,
                             ITextSerializer serializer,
                             IMessageReceiver <Envelope <IEvent> > eventReceiver)
            : base(eventReceiver, ProcessingFlags.Event)
        {
            _eventHandlerDescriptors = new Dictionary <Type, HandlerDescriptor>();

            _publishedVersionStore = publishedVersionStore;
            _resultBus             = resultBus;
            _commandBus            = commandBus;
            _eventBus   = eventBus;
            _serializer = serializer;
        }