当前位置: 首页>>代码示例>>C#>>正文


C# ICommandBus类代码示例

本文整理汇总了C#中ICommandBus的典型用法代码示例。如果您正苦于以下问题:C# ICommandBus类的具体用法?C# ICommandBus怎么用?C# ICommandBus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ICommandBus类属于命名空间,在下文中一共展示了ICommandBus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BookingApplicationService

 public BookingApplicationService(
     ICommandBus commandBus,
     IRoutingService routingService)
 {
     _commandBus = commandBus;
     _routingService = routingService;
 }
开发者ID:joaomajesus,项目名称:EventFlow,代码行数:7,代码来源:BookingApplicationService.cs

示例2: TaskController

 public TaskController(ICommandBus commandBus, IMappingEngine mappingEngine, IIdentity identity, IViewModelData viewModelData)
 {
     _commandBus = commandBus;
     _mappingEngine = mappingEngine;
     _identity = identity;
     _viewModelData = viewModelData;
 }
开发者ID:tomsean,项目名称:EventSourcingTodo,代码行数:7,代码来源:TaskController.cs

示例3: FoodExperienceController

 public FoodExperienceController(ICommandBus bus, IExperiencesQueryService experiencesQueryService)
 {
     if (bus == null) throw new ArgumentNullException("bus");
     if (experiencesQueryService == null) throw new ArgumentNullException("experiencesQueryService");
     _bus = bus;
     _experiencesQueryService = experiencesQueryService;
 }
开发者ID:jacerhea,项目名称:foodies,代码行数:7,代码来源:FoodExperienceController.cs

示例4: Setup

        public void Setup()
        {
            _commandBus = MockRepository.GenerateMock<ICommandBus>();
            _messageManager = MockRepository.GenerateMock<IMessageManager>();

            _commandExecutor = new CommandExecutor( _commandBus, _messageManager );
        }
开发者ID:RendaniTshinakaho,项目名称:PseudoCQRS,代码行数:7,代码来源:CommandExecutorTests.cs

示例5: QuestionsController

 public QuestionsController(ICommandBus commandBus,
     IQuestionManager questionManager)
 {
     _commandBus = commandBus;
     _questionManager = questionManager;
     _questionMapper = new QuestionToQuestionMapper();
 }
开发者ID:RaringCoder,项目名称:Crucial-CQRS,代码行数:7,代码来源:QuestionController.cs

示例6: CreateNewGameController

 public CreateNewGameController(IPlayerAuthenticator player_authenticator, 
                                IQueryService query_service,
                                ICommandBus command_bus)
 {
     _player_authenticator = player_authenticator;                                    
     _command_bus = command_bus;
 }
开发者ID:elbandit,项目名称:DDD-CQRS-Blackjack,代码行数:7,代码来源:CreateNewGameController.cs

示例7: ExpenseController

 public ExpenseController(ICommandBus commandBus, IMappingEngine mapper, ICategoryRepository categoryRepository, IExpenseRepository expenseRepository)
 {
     this.commandBus = commandBus;
     this.mapper = mapper;
     this.categoryRepository = categoryRepository;
     this.expenseRepository = expenseRepository;
 }
开发者ID:kostyrin,项目名称:PointNet,代码行数:7,代码来源:ExpenseController.cs

示例8: PokerServer

 public PokerServer(ICommandBus cmdBus, ITableProjection tableProjection, IPlayerConnectionMap playerConnectionMap, IClientChannel clientChannel)
 {
     _cmdBus = cmdBus;
     _tables = tableProjection;
     _playerConnectionMap = playerConnectionMap;
     _clientChannel = clientChannel;
 }
开发者ID:pdoh00,项目名称:card-game-framework,代码行数:7,代码来源:PokerServer.cs

示例9: given_controller

        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);
        }
开发者ID:wayne-o,项目名称:delete-me,代码行数:27,代码来源:RegistrationControllerFixture.cs

示例10: ProductController

 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;
 }
开发者ID:fvilers,项目名称:Darjeel,代码行数:7,代码来源:ProductController.cs

示例11: Run

        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();
        }
开发者ID:decarufe,项目名称:SimpleCQRS-1,代码行数:32,代码来源:Program.cs

示例12: FactController

 public FactController(
     ICommandBus commandBus,
     IReadStore readStore)
 {
     _commandBus = commandBus;
     _readStore = readStore;
 }
开发者ID:uncas,项目名称:NowSite,代码行数:7,代码来源:FactController.cs

示例13: PostController

 public PostController(ViewManager viewManager, IAuthenticationService authenticationService, ICommandBus commandBus)
     : base(commandBus)
 {
     _postView = viewManager.GetView<IPostView>();
     _blogView = viewManager.GetView<IBlogView>();
     _authenticationService = authenticationService;
 }
开发者ID:mastoj,项目名称:NBlog,代码行数:7,代码来源:PostController.cs

示例14: SubsController

 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;
 }
开发者ID:richardrcruzc,项目名称:skimur,代码行数:30,代码来源:SubsController.cs

示例15: ContentTreeNodeController

        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;
        }
开发者ID:burkhartt,项目名称:Bennington,代码行数:29,代码来源:ContentTreeNodeController.cs


注:本文中的ICommandBus类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。