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


C# BehaviorGraph.ChainFor方法代码示例

本文整理汇总了C#中BehaviorGraph.ChainFor方法的典型用法代码示例。如果您正苦于以下问题:C# BehaviorGraph.ChainFor方法的具体用法?C# BehaviorGraph.ChainFor怎么用?C# BehaviorGraph.ChainFor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BehaviorGraph的用法示例。


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

示例1: SetUp

        public void SetUp()
        {
            _runtime = FubuRuntime.For<ApplicationRegistry>();
            behaviors = _runtime.Get<BehaviorGraph>();

            appChain = behaviors.ChainFor<ApplicationActions>(x => x.get_app_action());
            pakChain = behaviors.ChainFor<PackageActions>(x => x.get_pak_action());
        }
开发者ID:DarthFubuMVC,项目名称:fubumvc,代码行数:8,代码来源:FubuPackageRegistry_Importing_Mechanics_Specs.cs

示例2: SetUp

        public void SetUp()
        {
            theHttpRequest = OwinHttpRequest.ForTesting();
            UrlContext.Stub("http://server");

            theUrlResolver = new ChainUrlResolver(theHttpRequest);

            theGraph = BehaviorGraph.BuildFrom(registry =>
            {
                registry.Actions.IncludeType<ChainUrlResolverEndpoint>();
            });

            theSimpleChain = theGraph.ChainFor<ChainUrlResolverEndpoint>(x => x.get_index());
            theChainWithRouteParams = theGraph.ChainFor(typeof(ChainUrlParams));
        }
开发者ID:kingreatwill,项目名称:fubumvc,代码行数:15,代码来源:ChainUrlResolverTester.cs

示例3: SetUp

        public void SetUp()
        {
            var registry = new FubuRegistry(x => {
                x.Actions.IncludeClassesSuffixedWithController();

                x.Configure(g =>
                {
                    g.ChainFor<AuthorizedController>(c => c.Go(null)).Authorization.AddRole("RoleA");
                });
            });

            graph = BehaviorGraph.BuildFrom(registry);

            goChain = graph.ChainFor<AuthorizedController>(x => x.Go(null));
            moveChain = graph.ChainFor<AuthorizedController>(x => x.Move(null));
        }
开发者ID:cothienlac86,项目名称:fubumvc,代码行数:16,代码来源:system_policy_for_authorization.cs

示例4: should_throw_an_exception_if_the_result_is_not_unique

        public void should_throw_an_exception_if_the_result_is_not_unique()
        {
            var call1 = ActionCall.For<Issue101Endpoint>(x => x.get_hello());
            var call2 = ActionCall.For<Issue101Endpoint>(x => x.get_hello());

            var graph = new BehaviorGraph();
            graph.AddChain().AddToEnd(call1);
            graph.AddChain().AddToEnd(call2);

            Exception<FubuException>.ShouldBeThrownBy(() => {
                graph.ChainFor<Issue101Endpoint>(x => x.get_hello());
            });
        }
开发者ID:cothienlac86,项目名称:fubumvc,代码行数:13,代码来源:Issue101.cs

示例5: SetUp

        public void SetUp()
        {
            container = new Container();
            container.Inject(new TransportSettings
            {
                DelayMessagePolling = Int32.MaxValue,
                ListenerCleanupPolling = Int32.MaxValue
            });
            theServiceBus = MockRepository.GenerateMock<IServiceBus>();

            var registry = new FubuRegistry();
            registry.ServiceBus.Enable(true);
            registry.Actions.IncludeType<MessageOnePublisher>();
            registry.StructureMap(container);
            registry.AlterSettings<LightningQueueSettings>(x => x.DisableIfNoChannels = true);

            theRuntime = registry.ToRuntime();
            theGraph = theRuntime.Get<BehaviorGraph>();
            chain = theGraph.ChainFor<MessageOnePublisher>(x => x.post_message1(null));

            container.Inject(theServiceBus);
        }
开发者ID:kingreatwill,项目名称:fubumvc,代码行数:22,代码来源:PublishingConfigurationIntegrationTester.cs


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