public PostsController(IPostView posts, IView<Comment> commentsView, ICommandCoordinator commandCoordinator, ISagaNarrator sagaNarrator) { _posts = posts; _commentsView = commentsView; _commandCoordinator = commandCoordinator; _sagaNarrator = sagaNarrator; }
public CampaignsController( IQueryRepository<Query.Campaigns.Campaign> repository, ICommandCoordinator coordinator) { _repository = repository; _coordinator = coordinator; }
public CommandCoordinator( ICommandCoordinator commandCoordinator, ITypeDiscoverer typeDiscoverer, ICommandContextConnectionManager commandContextConnectionManager, ISerializer serializer) { _commandCoordinator = commandCoordinator; _typeDiscoverer = typeDiscoverer; _commandContextConnectionManager = commandContextConnectionManager; _serializer = serializer; }
public CommandCoordinatorService( ICommandCoordinator commandCoordinator, ISerializer serializer, ITypeDiscoverer typeDiscoverer, ISagaLibrarian sagaLibrarian) { _commandCoordinator = commandCoordinator; _serializer = serializer; _typeDiscoverer = typeDiscoverer; _sagaLibrarian = sagaLibrarian; }
/// <summary> /// Initializes a new instance of the <see cref="CommandsController"/> class. /// </summary> /// <param name="artifactTypes"><see cref="IArtifactMapper{T}"/> for mapping commands.</param> /// <param name="objectFactory"><see cref="IObjectFactory"/> for creating instances of commands.</param> /// <param name="artifactTypeMap"><see cref="IArtifactTypeMap"/> for mapping artifacts to types.</param> /// <param name="commandCoordinator"><see cref="ICommandCoordinator"/> for coordinating commands.</param> /// <param name="serializer">JSON <see cref="ISerializer"/>.</param> /// <param name="logger">The <see cref="ILogger"/> to use.</param> public CommandsController( IArtifactMapper <ICommand> artifactTypes, IObjectFactory objectFactory, IArtifactTypeMap artifactTypeMap, ICommandCoordinator commandCoordinator, ISerializer serializer, ILogger logger) : base(artifactTypes, objectFactory, logger) { _artifactTypeMap = artifactTypeMap; _commandCoordinator = commandCoordinator; _serializer = serializer; }
/// <summary> /// Initializes a new instance of <see cref="CommandCoordinator"/> /// </summary> /// <param name="commandCoordinator">The underlying <see cref="ICommandCoordinator"/> </param> /// <param name="executionContextConfigurator"><see cref="IExecutionContextConfigurator"/> for configuring the <see cref="Dolittle.Execution.ExecutionContext"/></param> /// <param name="tenantResolver"></param> /// <param name="serializer"><see cref="ISerializer"/> for serialization purposes</param> /// <param name="commands">Instances of <see cref="ICommand"/></param> public CommandCoordinator( ICommandCoordinator commandCoordinator, IExecutionContextConfigurator executionContextConfigurator, ITenantResolver tenantResolver, ISerializer serializer, IInstancesOf <ICommand> commands) { _commandCoordinator = commandCoordinator; _commands = commands; _serializer = serializer; _executionContextConfigurator = executionContextConfigurator; _tenantResolver = tenantResolver; }
public TestDataGeneratorController( ICommandCoordinator commandCoordinator, IAdminRepository adminRepository, IDataConsumerRepository dataConsumerRepository, IDataCoordinatorRepository dataCoordinatorRepository, IDataOwnerRepository dataOwnerRepository, IDataVerifierRepository dataVerifierRepository, ISystemConfiguratorRepository systemConfiguratorRepository) { _commandCoordinator = commandCoordinator; _adminRepository = adminRepository; _dataCoordinatorRepository = dataCoordinatorRepository; _dataOwnerRepository = dataOwnerRepository; _dataVerifierRepository = dataVerifierRepository; _systemConfiguratorRepository = systemConfiguratorRepository; _dataConsumerRepository = dataConsumerRepository; }
public CommandScenario() { principal = new GenericPrincipal(new GenericIdentity("test"), new string[] { }); event_source = new Mock <IEventSource>(); GeneratedEvents = new UncommittedEventStream(event_source.Object); uncommitted_event_stream_coordinator = new Mock <IUncommittedEventStreamCoordinator>(); process_method_invoker = new Mock <IProcessMethodInvoker>(); call_context_mock = new Mock <ICallContext>(); execution_context_factory_mock = new Mock <IExecutionContextFactory>(); execution_context_manager = new ExecutionContextManager(execution_context_factory_mock.Object, call_context_mock.Object); command_context_factory = new CommandContextFactory(uncommitted_event_stream_coordinator.Object, process_method_invoker.Object, execution_context_manager); command_context_manager = new CommandContextManager(command_context_factory); command_handler_manager = new Mock <ICommandHandlerManager>(); command_handler_manager.Setup(m => m.Handle(It.IsAny <ICommand>())).Callback((ICommand c) => command_handler.Handle((dynamic)c)); localizer = new Mock <ILocalizer>(); command_validators_mock = new Mock <ICommandValidators>(); command_security_manager_mock = new Mock <ICommandSecurityManager>(); //TODO: Allow spec'ing of Security command_security_manager_mock.Setup(s => s.Authorize(It.IsAny <ICommand>())).Returns(new AuthorizationResult()); command_coordinator = new CommandCoordinator( command_handler_manager.Object, command_context_manager, command_security_manager_mock.Object, command_validators_mock.Object, localizer.Object, Mock.Of <IExceptionPublisher>(), Mock.Of <ILogger>()); null_validator_mock = new Mock <ICanValidate <T> >(); null_validator = null_validator_mock.Object; input_validator = null_validator; business_validator = null_validator; uncommitted_event_stream_coordinator.Setup(es => es.Commit(It.IsAny <TransactionCorrelationId>(), It.IsAny <UncommittedEventStream>())) .Callback((TransactionCorrelationId i, UncommittedEventStream ues) => RecordGeneratedEvents(ues)); }
public TestDataGeneratorController( ICommandCoordinator commandCoordinator, IAdminRepository adminRepository, IDataConsumerRepository dataConsumerRepository, IDataCoordinatorRepository dataCoordinatorRepository, IDataOwnerRepository dataOwnerRepository, IDataVerifierRepository dataVerifierRepository, ISystemConfiguratorRepository systemConfiguratorRepository, IDataCollectors dataCollectors, IGreetingHistories greetingHistories ) { _commandCoordinator = commandCoordinator; _adminRepository = adminRepository; _dataCoordinatorRepository = dataCoordinatorRepository; _dataOwnerRepository = dataOwnerRepository; _dataVerifierRepository = dataVerifierRepository; _systemConfiguratorRepository = systemConfiguratorRepository; _dataConsumerRepository = dataConsumerRepository; _dataCollectors = dataCollectors; _greetingHistories = greetingHistories; }
/// <summary> /// Initializes a new instance of <see cref="CommandInvocationHandler"/> /// </summary> /// <param name="commandCoordinator"></param> public CommandInvocationHandler(ICommandCoordinator commandCoordinator) { _commandCoordinator = commandCoordinator; }
public TagsController(IView<Tag> repository, ICommandCoordinator commandCoordinator) { _repository = repository; _commandCoordinator = commandCoordinator; }
public Dispatcher(IQueryProcessor queryProcessor, ICommandCoordinator commandCoordinator) { _queryProcessor = queryProcessor.NotNull(); _commandCoordinator = commandCoordinator.NotNull(); }
/// <summary> /// Initializes a new instance of <see cref="CommandFactory"/> /// </summary> /// <param name="commandCoordinator"><see cref="ICommandCoordinator"/> to use when handling commands</param> public CommandFactory(ICommandCoordinator commandCoordinator, ICommandBuildingConventions conventions) { _commandCoordinator = commandCoordinator; _conventions = conventions; }
public CommandController(ICommandCoordinator commands) { _commands = commands; }
public AuthenticationService(IView<User> repository, ICommandCoordinator commandCoordinator) { _repository = repository; _commandCoordinator = commandCoordinator; }
public InstallationCallbackHandler( ICommandCoordinator commandCoordinator ) { _commandCoordinator = commandCoordinator; }
public InstallationsWebhookHandler( ICommandCoordinator commandCoordinator ) { _commandCoordinator = commandCoordinator; }
/// <summary> /// Initializes a new instance of <see cref="Command"/> /// </summary> /// <param name="commandCoordinator"><see cref="ICommandCoordinator"/> to use for handling the command</param> public Command(ICommandCoordinator commandCoordinator) : base() { CommandCoordinator = commandCoordinator; }
public BlogsController(IView<BlogEntity.Blog> repository, ICommandCoordinator commandCoordinator) { _repository = repository; _commandCoordinator = commandCoordinator; }
public UsersController(IAuthenticationService authenticationService, ICommandCoordinator commandCoordinator) { _authenticationService = authenticationService; _commandCoordinator = commandCoordinator; }
public MyExternalEventHandler(ICommandCoordinator coordinator, ILogger <MyExternalEventHandler> logger) { _coordinator = coordinator; _logger = logger; }
public OverviewHub(AccountsOverview accountsOverview, ICommandCoordinator commandCoordinator) { _accountsOverview = accountsOverview; _commandCoordinator = commandCoordinator; }