• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ICommandBus类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: AccountController

 public AccountController(ICommandBus commandBus, IUserRepository userRepository,
                          IFormsAuthentication formAuthentication)
 {
     this.commandBus = commandBus;
     this.userRepository = userRepository;
     this.formAuthentication = formAuthentication;
 }
开发者ID:luowei98,项目名称:YiHe,代码行数:7,代码来源:AccountController.cs


示例17: AccountRegisterController

 public AccountRegisterController(ILocalAuthenticationService authentication_service,
                                  ICommandBus command_bus,
                                  IFormsAuthentication forms_authentication)
 {
     _authentication_service = authentication_service;
     _command_bus = command_bus;
     _forms_authentication = forms_authentication;
 }
开发者ID:elbandit,项目名称:DDD-CQRS-Blackjack,代码行数:8,代码来源:AccountRegisterController.cs


示例18: RefreshTokenProvider

 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();
 }
开发者ID:hoangvv1409,项目名称:codebase,代码行数:8,代码来源:RefreshTokenProvider.cs


示例19: CashInController

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


示例20: Seed

 static async void Seed(ICommandBus bus)
 {
     while (true)
     {
         await bus.SendAsync(new LabCommand());
         await Task.Delay(3000);
     }
 }
开发者ID:perokvist,项目名称:CommandBus.Lab,代码行数:8,代码来源:Program.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ICommandConsole类代码示例发布时间:2022-05-24
下一篇:
C# ICommandBuilder类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap