Пример #1
0
 public EventProcessorFactory(
     IMessageHandler messageHandler,
     IEventProcessingExceptionHandler exceptionHandler,
     CancellationToken cancellationToken)
 {
     _messageProcessor  = new EventMessageProcessor(messageHandler);
     _exceptionHandler  = exceptionHandler ?? throw new ArgumentNullException(nameof(exceptionHandler));
     _cancellationToken = cancellationToken;
 }
Пример #2
0
 public EventProcessor(
     EventMessageProcessor processor,
     IEventProcessingExceptionHandler exceptionHandler,
     CancellationToken cancellationToken)
 {
     _serializer        = new EventDataSerializer();
     _processor         = processor;
     _exceptionHandler  = exceptionHandler;
     _cancellationToken = cancellationToken;
 }