/// <summary> /// Initializes a new instance of the <see cref="ValidateFilterForAllTenants"/> class. /// </summary> /// <param name="onAllTenants">The <see cref="IPerformActionOnAllTenants" />.</param> /// <param name="filterValidators">The <see cref="IFilterValidators" />.</param> /// <param name="getFilterDefinitions">The <see cref="FactoryFor{T}" /> <see cref="IFilterDefinitions" />.</param> /// <param name="logger">The <see cref="ILogger" />.</param> public ValidateFilterForAllTenants( IPerformActionOnAllTenants onAllTenants, IFilterValidators filterValidators, FactoryFor <IFilterDefinitions> getFilterDefinitions, ILogger logger) { _onAllTenants = onAllTenants; _filterValidators = filterValidators; _getFilterDefinitions = getFilterDefinitions; _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="StreamProcessors"/> class. /// </summary> /// <param name="onAllTenants">The <see cref="IPerformActionOnAllTenants" />.</param> /// <param name="getScopedStreamProcessorsCreator">The <see cref="FactoryFor{T}" /> <see cref="ICreateScopedStreamProcessors" />.</param> /// <param name="executionContextManager">The <see cref="IExecutionContextManager" />.</param> /// <param name="loggerManager">The <see cref="ILoggerManager" />.</param> public StreamProcessors( IPerformActionOnAllTenants onAllTenants, FactoryFor <ICreateScopedStreamProcessors> getScopedStreamProcessorsCreator, IExecutionContextManager executionContextManager, ILoggerManager loggerManager) { _onAllTenants = onAllTenants; _getScopedStreamProcessorsCreator = getScopedStreamProcessorsCreator; _streamProcessors = new ConcurrentDictionary <StreamProcessorId, StreamProcessor>(); _executionContextManager = executionContextManager; _loggerManager = loggerManager; _logger = loggerManager.CreateLogger <StreamProcessors>(); }
/// <summary> /// Initializes a new instance of the <see cref="StreamProcessor"/> class. /// </summary> /// <param name="streamProcessorId">The <see cref="StreamProcessorId" />.</param> /// <param name="onAllTenants">The <see cref="IPerformActionOnAllTenants" />.</param> /// <param name="streamDefinition">The <see cref="IStreamDefinition" />.</param> /// <param name="getEventProcessor">The <see cref="Func{TResult}" /> that returns an <see cref="IEventProcessor" />.</param> /// <param name="unregister">An <see cref="Action" /> that unregisters the <see cref="ScopedStreamProcessor" />.</param> /// <param name="getScopedStreamProcessorsCreator">The <see cref="ICreateScopedStreamProcessors" />.</param> /// <param name="executionContextManager">The <see cref="IExecutionContextManager" />.</param> /// <param name="logger">The <see cref="ILogger" />.</param> /// <param name="cancellationToken">The <see cref="CancellationToken" />.</param> public StreamProcessor( StreamProcessorId streamProcessorId, IPerformActionOnAllTenants onAllTenants, IStreamDefinition streamDefinition, Func <IEventProcessor> getEventProcessor, Action unregister, FactoryFor <ICreateScopedStreamProcessors> getScopedStreamProcessorsCreator, IExecutionContextManager executionContextManager, ILogger <StreamProcessor> logger, CancellationToken cancellationToken) { _identifier = streamProcessorId; _onAllTenants = onAllTenants; _streamDefinition = streamDefinition; _getEventProcessor = getEventProcessor; _unregister = unregister; _getScopedStreamProcessorsCreator = getScopedStreamProcessorsCreator; _executionContextManager = executionContextManager; _logger = logger; _internalCancellationTokenSource = new CancellationTokenSource(); _externalCancellationToken = cancellationToken; _unregisterTokenRegistration = _externalCancellationToken.Register(_unregister); }
/// <summary> /// Initializes a new instance of the <see cref="StreamDefinitions"/> class. /// </summary> /// <param name="onAllTenants">The <see cref="IPerformActionOnAllTenants" />.</param> /// <param name="getStreamDefinitions">The <see cref="FactoryFor{T}" /> <see cref="IStreamDefinitionRepository" />.</param> public StreamDefinitions(IPerformActionOnAllTenants onAllTenants, FactoryFor <IStreamDefinitionRepository> getStreamDefinitions) { _onAllTenants = onAllTenants; _getStreamDefinitions = getStreamDefinitions; }