コード例 #1
0
 public SimpleEventHandlerInvoker(List <object> eventListeners, IParameterResolverFactory parameterResolverFactory,
                                  IListenerInvocationErrorHandler listenerInvocationErrorHandler, ISequencingPolicy <IEventMessage> sequencingPolicy)
 {
     _eventListeners        = eventListeners;
     _wrappedEventListeners = eventListeners
                              .Select(listener => listener is IEventListener eventListener ? eventListener : new AnnotationEventListenerAdapter(listener))
                              .ToList();
     _sequencingPolicy = sequencingPolicy;
     _listenerInvocationErrorHandler = listenerInvocationErrorHandler;
 }
コード例 #2
0
 public SimpleEventHandlerInvoker(List <object> eventListeners, IParameterResolverFactory parameterResolverFactory,
                                  IListenerInvocationErrorHandler listenerInvocationErrorHandler)
     : this(eventListeners, parameterResolverFactory, listenerInvocationErrorHandler, new SequentialPerAggregatePolicy())
 {
 }
コード例 #3
0
 public SimpleEventHandlerInvoker(List <object> eventListeners, IListenerInvocationErrorHandler listenerInvocationErrorHandler)
     : this(eventListeners, listenerInvocationErrorHandler, new SequentialPerAggregatePolicy())
 {
 }
コード例 #4
0
 public AnnotatedSagaManager(ISagaRepository <T> sagaRepository, Func <T> sagaFactory, ISagaModel sagaMetaModel, IListenerInvocationErrorHandler listenerInvocationErrorHandler)
     : base(sagaRepository, sagaFactory, listenerInvocationErrorHandler)
 {
     _sagaMetaModel = sagaMetaModel;
 }
コード例 #5
0
 public AnnotatedSagaManager(ISagaRepository <T> sagaRepository, Func <T> sagaFactory, IParameterResolverFactory parameterResolverFactory, IHandlerDefinition handlerDefinition, IListenerInvocationErrorHandler listenerInvocationErrorHandler)
     : this(sagaRepository, sagaFactory, new AnnotationSagaMetaModelFactory(parameterResolverFactory, handlerDefinition).ModelOf <T>(), new LoggingErrorHandler())
 {
 }
コード例 #6
0
 public AbstractSagaManager(ISagaRepository <T> sagaRepository, Func <T> sagaFactory, IListenerInvocationErrorHandler listenerInvocationErrorHandler)
 {
     _sagaRepository = sagaRepository ?? throw new ArgumentNullException(nameof(sagaFactory));
     _sagaFactory    = sagaFactory;
     _listenerInvocationErrorHandler = listenerInvocationErrorHandler;
 }