/// <summary> /// Initializes a new instance of the <see cref="EventHandlerProcessors"/> class. /// </summary> /// <param name="handlersClient">The <see cref="EventHandlersClient"/> to use to connect to the Runtime.</param> /// <param name="reverseCallClients">The <see cref="IReverseCallClients"/> to use for creating instances of <see cref="IReverseCallClient{TClientMessage, TServerMessage, TConnectArguments, TConnectResponse, TRequest, TResponse}"/>.</param> /// <param name="eventProcessingCompletion">The <see cref="IEventProcessingCompletion"/> to use for notifying of event handling completion.</param> /// <param name="artifactTypeMap">The <see cref="IArtifactTypeMap"/> to use for converting event types to artifacts.</param> /// <param name="converter">The <see cref="IEventConverter"/> to use to convert events.</param> /// <param name="loggerManager">The <see cref="ILoggerManager"/> to use for creating instances of <see cref="ILogger"/>.</param> public EventHandlerProcessors( EventHandlersClient handlersClient, IReverseCallClients reverseCallClients, IEventProcessingCompletion eventProcessingCompletion, IArtifactTypeMap artifactTypeMap, IEventConverter converter, ILoggerManager loggerManager) { _handlersClient = handlersClient; _reverseCallClients = reverseCallClients; _eventProcessingCompletion = eventProcessingCompletion; _artifactTypeMap = artifactTypeMap; _converter = converter; _loggerManager = loggerManager; }
/// <summary> /// Initializes a new instance of the <see cref="EventHandlerProcessor{TEventType}"/> class. /// </summary> /// <param name="handlerId">The unique <see cref="EventHandlerId"/> for the event handler.</param> /// <param name="scope">The <see cref="ScopeId"/> of the scope in the Event Store where the event handler will run.</param> /// <param name="partitioned">Whether the event handler should create a partitioned stream or not.</param> /// <param name="handler">The <see cref="IEventHandler{TEventType}"/> that will be called to handle incoming events.</param> /// <param name="client">The <see cref="EventHandlersClient"/> to use to connect to the Runtime.</param> /// <param name="reverseCallClients">The <see cref="IReverseCallClients"/> to use for creating instances of <see cref="IReverseCallClient{TClientMessage, TServerMessage, TConnectArguments, TConnectResponse, TRequest, TResponse}"/>.</param> /// <param name="completion">The <see cref="IEventProcessingCompletion"/> to use for notifying of event handling completion.</param> /// <param name="artifacts">The <see cref="IArtifactTypeMap"/> to use for converting event types to artifacts.</param> /// <param name="converter">The <see cref="IEventConverter"/> to use to convert events.</param> /// <param name="logger">The <see cref="ILogger"/> to use for logging.</param> public EventHandlerProcessor( EventHandlerId handlerId, ScopeId scope, bool partitioned, IEventHandler <TEventType> handler, EventHandlersClient client, IReverseCallClients reverseCallClients, IEventProcessingCompletion completion, IArtifactTypeMap artifacts, IEventConverter converter, ILogger logger) : base(logger) { Identifier = handlerId; _scope = scope; _partitioned = partitioned; _handler = handler; _client = client; _reverseCallClients = reverseCallClients; _completion = completion; _artifacts = artifacts; _converter = converter; _logger = logger; }