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


C# FubuRegistry.BehaviorFor方法代码示例

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


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

示例1: with_no_other_explicit_action_discovery

        public void with_no_other_explicit_action_discovery()
        {
            var graph = new FubuRegistry(x =>
            {

            }).BuildGraph();

            graph.BehaviorFor<MyEndpoint>(x => x.Go()).ShouldNotBeNull();
            graph.BehaviorFor<MyEndpoints>(x => x.Go()).ShouldNotBeNull();
            graph.BehaviorFor<MyEndpoints>(x => x.Go2()).ShouldNotBeNull();
        }
开发者ID:loudej,项目名称:fubumvc,代码行数:11,代码来源:default_action_discovery.cs

示例2: does_not_find_endpoints_with_an_explicit_action_discovery_policy

        public void does_not_find_endpoints_with_an_explicit_action_discovery_policy()
        {
            var graph = new FubuRegistry(x =>
            {
                x.Actions.FindWith(new FakeActionSource());
            }).BuildGraph();

            graph.BehaviorFor<MyEndpoint>(x => x.Go()).ShouldBeNull();
            graph.BehaviorFor<MyEndpoints>(x => x.Go()).ShouldBeNull();
            graph.BehaviorFor<MyEndpoints>(x => x.Go2()).ShouldBeNull();
        }
开发者ID:loudej,项目名称:fubumvc,代码行数:11,代码来源:default_action_discovery.cs

示例3: does_not_find_endpoints_with_an_explicit_action_discovery

        public void does_not_find_endpoints_with_an_explicit_action_discovery()
        {
            var graph = new FubuRegistry(x =>
            {
                x.Actions.IncludeClassesSuffixedWithController();
            }).BuildGraph();

            graph.BehaviorFor<MyEndpoint>(x => x.Go()).ShouldBeNull();
            graph.BehaviorFor<MyEndpoints>(x => x.Go()).ShouldBeNull();
            graph.BehaviorFor<MyEndpoints>(x => x.Go2()).ShouldBeNull();
        }
开发者ID:loudej,项目名称:fubumvc,代码行数:11,代码来源:default_action_discovery.cs

示例4: will_find_endpoints_if_endpoint_is_explictly_specified_too

        public void will_find_endpoints_if_endpoint_is_explictly_specified_too()
        {
            var graph = new FubuRegistry(x =>
            {
                x.Actions.FindWith(new FakeActionSource());
                x.Actions.IncludeClassesSuffixedWithEndpoint();
            }).BuildGraph();

            graph.BehaviorFor<MyEndpoint>(x => x.Go()).ShouldNotBeNull();
            graph.BehaviorFor<MyEndpoints>(x => x.Go()).ShouldNotBeNull();
            graph.BehaviorFor<MyEndpoints>(x => x.Go2()).ShouldNotBeNull();
        }
开发者ID:loudej,项目名称:fubumvc,代码行数:12,代码来源:default_action_discovery.cs

示例5: SetUp

        public void SetUp()
        {
            BehaviorGraph behaviorGraph = new FubuRegistry().BuildGraph();

            theContentCache = behaviorGraph.Services.DefaultServiceFor<IAssetContentCache>()
                .Value.ShouldBeOfType<AssetContentCache>();

            theChain = behaviorGraph.BehaviorFor<AssetWriter>(x => x.Write(null));
        }
开发者ID:loudej,项目名称:fubumvc,代码行数:9,代码来源:AssetContentEndpointConstructionTester.cs

示例6: SetUp

        public void SetUp()
        {
            var graph = new FubuRegistry(x =>
            {
                x.Actions.IncludeType<MethodAction>();

            }).BuildGraph();

            theChain = graph.BehaviorFor<MethodAction>(x => x.Get_cases_from_Start_to_End(null));
        }
开发者ID:KevM,项目名称:fubumvc,代码行数:10,代码来源:MethodToUrlBuilderTester.cs


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