public TaskController(ICommandBus commandBus, IMappingEngine mappingEngine, IIdentity identity, IViewModelData viewModelData) { _commandBus = commandBus; _mappingEngine = mappingEngine; _identity = identity; _viewModelData = viewModelData; }
public ExpenseController(ICommandBus commandBus, IMappingEngine mapper, ICategoryRepository categoryRepository, IExpenseRepository expenseRepository) { this.commandBus = commandBus; this.mapper = mapper; this.categoryRepository = categoryRepository; this.expenseRepository = expenseRepository; }
public BookingApplicationService( ICommandBus commandBus, IRoutingService routingService) { _commandBus = commandBus; _routingService = routingService; }
public void Setup() { // // observers SystemObserver.Setup(new IObserver<ISystemEvent>[] { new ConsoleObserver() }); // // message router Router = new MemoryMessageRouter(); Router.RegisterHandler<CreateAccount>(new CreateAccountHandler().Handle); Router.RegisterHandler<AccountCreated>(new AccountCreatedHandler().Handle); // // message bus var bus = new NullBus(); CommandBus = bus; EventBus = bus; // // Queue Writer var queueWriter = new QueueWriterToBus(bus); // // Misc Sender = new MessageSender(new IQueueWriter[] { queueWriter }); Identifier = new AccountID(Guid.NewGuid()); }
public PokerServer(ICommandBus cmdBus, ITableProjection tableProjection, IPlayerConnectionMap playerConnectionMap, IClientChannel clientChannel) { _cmdBus = cmdBus; _tables = tableProjection; _playerConnectionMap = playerConnectionMap; _clientChannel = clientChannel; }
public FoodExperienceController(ICommandBus bus, IExperiencesQueryService experiencesQueryService) { if (bus == null) throw new ArgumentNullException("bus"); if (experiencesQueryService == null) throw new ArgumentNullException("experiencesQueryService"); _bus = bus; _experiencesQueryService = experiencesQueryService; }
public PostController(ViewManager viewManager, IAuthenticationService authenticationService, ICommandBus commandBus) : base(commandBus) { _postView = viewManager.GetView<IPostView>(); _blogView = viewManager.GetView<IBlogView>(); _authenticationService = authenticationService; }
public ProductController(IReadModelProductDao dao, ICommandBus bus) { if (dao == null) throw new ArgumentNullException(nameof(dao)); if (bus == null) throw new ArgumentNullException(nameof(bus)); _dao = dao; _bus = bus; }
private void Run() { runtime = new SampleRunTime(CONNECTION_STRING); runtime.Start(); // Configure dependencies System.Data.Entity.Database.SetInitializer<SqlBankContext>(new System.Data.Entity.DropCreateDatabaseIfModelChanges<SqlBankContext>()); var db = new SqlBankContext(CONNECTION_STRING); runtime.ServiceLocator.Register(db); // Get the Command Bus commandBus = runtime.ServiceLocator.Resolve<ICommandBus>(); // Create and send a couple of command var accountReportReadModel = runtime.ServiceLocator.Resolve<AccountReportReadService>(); var accounts = accountReportReadModel.GetAccounts(); if (accounts.Count() == 0) { Console.WriteLine("Adding initial data...\n\n\n"); var cmdMarcus = new CreateAccountCommand { FirstName = "Marcus", LastName = "Hammarberg" }; var cmdDarren = new CreateAccountCommand { FirstName = "Darren", LastName = "Cauthon" }; var cmdTyrone = new CreateAccountCommand { FirstName = "Tyrone", LastName = "Groves" }; commandBus.Send(cmdMarcus); commandBus.Send(cmdDarren); commandBus.Send(cmdTyrone); } ProcessMenu(); runtime.Shutdown(); Console.ReadLine(); }
public ContentTreeNodeController(IContentTreePageNodeContext contentTreePageNodeContext, IContentTreeNodeToContentTreeNodeInputModelMapper contentTreeNodeToContentTreeNodeInputModelMapper, ITreeNodeRepository treeNodeRepository, IContentTreeNodeProviderContext contentTreeNodeProviderContext, IContentTreeNodeDisplayViewModelBuilder contentTreeNodeDisplayViewModelBuilder, IRawUrlGetter rawUrlGetter, ICommandBus commandBus, IGuidGetter guidGetter, IContentTreeNodeFileUploadPersister contentTreeNodeFileUploadPersister, ICurrentUserContext currentUserContext, ITreeNodeIdToUrl treeNodeIdToUrl, IGetUrlOfFrontSideWebsite getUrlOfFrontSideWebsite, IContentTree contentTree, IContentTreeNodeMetaInformationViewModelBuilder contentTreeNodeMetaInformationViewModelBuilder) { CurrentUserContext = currentUserContext; this.contentTreeNodeMetaInformationViewModelBuilder = contentTreeNodeMetaInformationViewModelBuilder; this.contentTree = contentTree; this.getUrlOfFrontSideWebsite = getUrlOfFrontSideWebsite; this.treeNodeIdToUrl = treeNodeIdToUrl; this.currentUserContext = currentUserContext; this.contentTreeNodeFileUploadPersister = contentTreeNodeFileUploadPersister; this.guidGetter = guidGetter; this.commandBus = commandBus; this.contentTreeNodeProviderContext = contentTreeNodeProviderContext; this.treeNodeRepository = treeNodeRepository; this.contentTreeNodeToContentTreeNodeInputModelMapper = contentTreeNodeToContentTreeNodeInputModelMapper; this.contentTreePageNodeContext = contentTreePageNodeContext; }
public AccountController(ICommandBus commandBus, IUserRepository userRepository, IFormsAuthentication formAuthentication) { this.commandBus = commandBus; this.userRepository = userRepository; this.formAuthentication = formAuthentication; }
public FactController( ICommandBus commandBus, IReadStore readStore) { _commandBus = commandBus; _readStore = readStore; }
public SubsController(IContextService contextService, ISubDao subDao, IMapper mapper, ICommandBus commandBus, IUserContext userContext, IPostDao postDao, IVoteDao voteDao, ICommentDao commentDao, IPermissionDao permissionDao, ICommentNodeHierarchyBuilder commentNodeHierarchyBuilder, ICommentTreeContextBuilder commentTreeContextBuilder, IPostWrapper postWrapper, ISubWrapper subWrapper, ICommentWrapper commentWrapper) { _contextService = contextService; _subDao = subDao; _mapper = mapper; _commandBus = commandBus; _userContext = userContext; _postDao = postDao; _voteDao = voteDao; _commentDao = commentDao; _permissionDao = permissionDao; _commentNodeHierarchyBuilder = commentNodeHierarchyBuilder; _commentTreeContextBuilder = commentTreeContextBuilder; _postWrapper = postWrapper; _subWrapper = subWrapper; _commentWrapper = commentWrapper; }
public void Setup() { _commandBus = MockRepository.GenerateMock<ICommandBus>(); _messageManager = MockRepository.GenerateMock<IMessageManager>(); _commandExecutor = new CommandExecutor( _commandBus, _messageManager ); }
public given_controller() { this.bus = Mock.Of<ICommandBus>(); this.conferenceDao = Mock.Of<IConferenceDao>(x => x.GetConferenceAlias(conferenceAlias.Code) == conferenceAlias); this.orderDao = Mock.Of<IOrderDao>(); this.routes = new RouteCollection(); this.routeData = new RouteData(); this.routeData.Values.Add("conferenceCode", conferenceAlias.Code); var requestMock = new Mock<HttpRequestBase>(MockBehavior.Strict); requestMock.SetupGet(x => x.ApplicationPath).Returns("/"); requestMock.SetupGet(x => x.Url).Returns(new Uri("http://localhost/request", UriKind.Absolute)); requestMock.SetupGet(x => x.ServerVariables).Returns(new NameValueCollection()); var responseMock = new Mock<HttpResponseBase>(MockBehavior.Strict); responseMock.Setup(x => x.ApplyAppPathModifier(It.IsAny<string>())).Returns<string>(s => s); var context = Mock.Of<HttpContextBase>(c => c.Request == requestMock.Object && c.Response == responseMock.Object); this.sut = new RegistrationController(this.bus, this.orderDao, this.conferenceDao); this.sut.ConferenceAlias = conferenceAlias; this.sut.ConferenceCode = conferenceAlias.Code; this.sut.ControllerContext = new ControllerContext(context, this.routeData, this.sut); this.sut.Url = new UrlHelper(new RequestContext(context, this.routeData), this.routes); }
public QuestionsController(ICommandBus commandBus, IQuestionManager questionManager) { _commandBus = commandBus; _questionManager = questionManager; _questionMapper = new QuestionToQuestionMapper(); }
public CreateNewGameController(IPlayerAuthenticator player_authenticator, IQueryService query_service, ICommandBus command_bus) { _player_authenticator = player_authenticator; _command_bus = command_bus; }
public ControllerBase(ICommandBus commandBus, IMenuRepository menuRepository, IPartRepository partRepository) { CommandBus = commandBus; MenuRepository = menuRepository; PartRepository = partRepository; }
public MenuListViewModel(IViewModelResolver viewModelResolver, IViewProvider viewProvider, ICommandBus commandBus) : base(viewModelResolver) { _viewProvider = viewProvider; _commandBus = commandBus; Elements = new BindableCollection<MenuItemView>(); }
public AccountController(ICommandBus commandBus, RedisReadClient redisReadClient) { this.commandBus = commandBus; this.redisReadClient = redisReadClient; this.UserDevicePrefixNamespace = "UserDevice"; this.RefreshTokenPrefixNamespace = "Ticket"; }
public CashInController(IPlayerAuthenticator player_authenticator, ICommandBus command_bus, IQueryService query_service) { _player_authenticator = player_authenticator; _command_bus = command_bus; _query_service = query_service; }
public RefreshTokenProvider(IRefreshTokenService refreshTokenService, ICommandBus commandBus, int refreshTokenExpiredTimeInMinutes, int ttlChange) { this.refreshTokenService = refreshTokenService; this.commandBus = commandBus; this.expriredTime = refreshTokenExpiredTimeInMinutes; this.ttlChange = ttlChange; this.serializer = new TicketSerializer(); }
public AccountRegisterController(ILocalAuthenticationService authentication_service, ICommandBus command_bus, IFormsAuthentication forms_authentication) { _authentication_service = authentication_service; _command_bus = command_bus; _forms_authentication = forms_authentication; }
public AddWaiterViewModel(IViewModelResolver viewModelResolver, ICommandBus commandBus) : base(viewModelResolver) { if (commandBus == null) throw new ArgumentNullException("commandBus"); _commandBus = commandBus; }
public AddMenuItemViewModel(IViewModelResolver viewModelResolver, IViewProvider viewProvider, ICommandBus commandBus) : base(viewModelResolver) { _viewProvider = viewProvider; _commandBus = commandBus; Categories = new BindableCollection<CategoryView>(); }
static async void Seed(ICommandBus bus) { while (true) { await bus.SendAsync(new LabCommand()); await Task.Delay(3000); } }
public AuthorizationServerProvider(IUserService userService, IAdminUserService adminUserService, IAppService appService, ICommandBus commandBus) { this.userService = userService; this.adminUserService = adminUserService; this.appService = appService; this.commandBus = commandBus; }
public ContentTreeCacheImplementation(ITreeNodeRepository treeNodeRepository, IContentTreeNodeProviderContext contentTreeNodeProviderContext, ICommandBus commandBus, IGuidGetter guidGetter, IGetPathToDataDirectoryService getPathToDataDirectoryService) : base(treeNodeRepository, contentTreeNodeProviderContext, commandBus, guidGetter) { this.getPathToDataDirectoryService = getPathToDataDirectoryService; }
public AccountController(IMappingEngine mapper, ICommandBus commandBus, IUserRepository userRepository, ApplicationUserManager<PointNetUser, int> userManager , ILogger logger) { this._commandBus = commandBus; this._userRepository = userRepository; this._userManager = userManager; _logger = logger; _mapper = mapper; }
public with_a_BetController() { player_authenticator = MockRepository.GenerateStub<IPlayerAuthenticator>(); command_bus = MockRepository.GenerateStub<ICommandBus>(); query_service = MockRepository.GenerateStub<IQueryService>(); bet_command_mapper = MockRepository.GenerateStub<ICommandMapper<BetCommand, BetView>>(); SUT = new BetController(player_authenticator, command_bus, query_service, bet_command_mapper); }
public ICommandBusMiddleware <TCommand>[] CreateMiddlewares <TCommand>(ICommandBus commandBus) where TCommand : class, ICommandBase { return(serviceLocator.GetAll <ICommandBusMiddleware <TCommand> >() .ToArray()); }
public ThingyController( ICommandBus commandBus) { _commandBus = commandBus; }
public CustomersController(ICommandBus commandBus) { _commandBus = commandBus; }
public CommentsController(ICommandBus commandBus, IGrainFactory grainFactory) : base(commandBus) { this.grainFactory = grainFactory; }
public HistoryController(ICommandBus commandBus, IHistoryEventRepository historyEventRepository) : base(commandBus) { this.historyEventRepository = historyEventRepository; }
public AppsController(ICommandBus commandBus, IAppRepository appRepository) : base(commandBus) { this.appRepository = appRepository; }
public AddPatterns(InitialPatterns initialPatterns, ICommandBus commandBus, IAppsIndex indexForApps) { this.indexForApps = indexForApps; this.initialPatterns = initialPatterns; this.commandBus = commandBus; }
public ItemsController(ICommandBus bus) { Bus = bus; }
public DictionaryController(ICommandBus commandBus, IQueryBus queryBus) { _commandBus = commandBus; _queryBus = queryBus; }
public TariffsService(ITariffDao dao, ICommandBus commandBus) { _commandBus = commandBus; _dao = dao; }
public CameraService(ILogger logger, ICommandBus bus, ICameraConfiguration cameraConfiguration) { _logger = logger; _bus = bus; _cameraConfiguration = cameraConfiguration; }
public OrdersController(ICommandBus bus) { this.bus = bus; }
public AccountsController(ICommandBus commandBus, IQueryBus queryBus) { _commandBus = commandBus; _queryBus = queryBus; }
public TransactionsController(ICommandBus commandBus, IQueryBus queryBus) { this.commandBus = commandBus; this.queryBus = queryBus; }
public ActiveProductController(ICommandBus bus) : base(bus) { }
public LanguagesController(ICommandBus commandBus) : base(commandBus) { }
/// <summary> /// Initializes a new instance of the <see cref="BaseController"/> class. /// </summary> /// <param name="commandBus">The command bus.</param> /// <param name="queryProcessor">The query processor.</param> public BaseController(ICommandBus commandBus, IQueryProcessor queryProcessor) { CommandBus = commandBus; QueryProcessor = queryProcessor; }
public AppRolesController(ICommandBus commandBus, RolePermissionsProvider permissionsProvider) : base(commandBus) { this.permissionsProvider = permissionsProvider; }
public ManufactureController(ICommandBus commandBus, IManufactureQueries queries) { _commandBus = commandBus; _queries = queries; }
public ExecuteCommandJobHandler(ICommandBus commandBus) { this.commandBus = commandBus; }
public ConferenceViewModelGenerator(ICommandBus bus) { this.bus = bus; conferenceRepository = new ConferenceMongoRepository <ConferenceView>(); seatTypeRepository = new ConferenceMongoRepository <SeatTypeView>(); }
public static void Configure(ICommandBus commandBus, IBlogPostRepository blogPostRepository, IPageRepository pageRepository, IFileRepository fileRepository) { RegisterCommandHandlers(commandBus, blogPostRepository, pageRepository, fileRepository); }
public SchemaFieldsController(ICommandBus commandBus) : base(commandBus) { }
public UserManagementController(ICommandBus commandBus, IUserService userService) : base(commandBus) { this.userService = userService; }
//private readonly IBaseCommandHandler<CreateUserCommand> handler; //public UserController(IBaseCommandHandler<CreateUserCommand> handler) //{ // this.handler = handler; //} public UserController(ICommandBus commandBus, IUserQueryFacade userQueryFacade) { _commandBus = commandBus; _userQueryFacade = userQueryFacade; }
public WithResponseController(ICommandBus bus) { _bus = bus; }
public RegistrationProcessHardeningIntegrationSteps() { commandBus = ConferenceHelper.BuildCommandBus(); eventBus = ConferenceHelper.BuildEventBus(); }
protected ApiControllerBase(ICommandBus bus) { Bus = bus; }
public RefreshTokenCommandHandler(IConfiguration configuration, IQueryBus queryBus, ICommandBus commandBus, UserManager <AspNetUser> userManager, TokenValidationParameters tokenValidationParams) { _configuration = configuration; _queryBus = queryBus; _commandBus = commandBus; _userManager = userManager; _tokenValidationParams = tokenValidationParams; }
public IssuesController(IQueryBus queryBus, ICommandBus commandBus) { this.queryBus = queryBus ?? throw new ArgumentException(nameof(queryBus)); this.commandBus = commandBus ?? throw new ArgumentException(nameof(commandBus)); }