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


C# FubuRegistry.Navigation方法代码示例

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


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

示例1: Configure

 public void Configure(FubuRegistry registry)
 {
     registry.Navigation(x =>
     {
         x.ForMenu(StringConstants.BlogName);
         x.InsertAfter["Home"] = MenuNode.ForInput<AboutInputModel>("About");
     });
 }
开发者ID:mtscout6,项目名称:FubuMVC.Blog,代码行数:8,代码来源:InformationRegistry.cs

示例2: Configure

        public void Configure(FubuRegistry registry)
        {
            registry.ApplyConvention<AuthorizationConvention>();

            registry.Navigation<AuthorizationNavigationRegistry>();

            registry.Services(x =>
            {
                x.ReplaceService<IAuthorizationFailureHandler,AuthorizationFailureHandler>();
            });
        }
开发者ID:mtscout6,项目名称:FubuMVC.Blog,代码行数:11,代码来源:AuthorizationRegistry.cs

示例3: Configure

        public void Configure(FubuRegistry registry)
        {
            registry.ApplyConvention<NavigationRootPolicy>(x =>
            {
                x.ForKey(DiagnosticKeys.Main);
                x.WrapWithChrome<DashboardChrome>();

                x.Alter(chain => chain.BehaviorChain.Route.Prepend("_fubu"));
            });

            registry.Navigation<DiagnosticsMenu>();
        }
开发者ID:bobpace,项目名称:FubuMVC.Diagnostics,代码行数:12,代码来源:DiagnosticsChromeExtension.cs

示例4: navigation_method_on_fubu_registry_works

        public void navigation_method_on_fubu_registry_works()
        {
            var registry = new FubuRegistry();
            registry.Navigation(x =>
            {
                x.ForMenu(FakeKeys.Key1);
                x.Add += MenuNode.Node(FakeKeys.Key2);
                x.Add += MenuNode.Node(FakeKeys.Key3);
            });

            var graph = BehaviorGraph.BuildFrom(registry).Settings.Get<NavigationGraph>();

            graph.MenuFor(FakeKeys.Key1).Select(x => x.Key)
                .ShouldHaveTheSameElementsAs(FakeKeys.Key2, FakeKeys.Key3);
        }
开发者ID:aluetjen,项目名称:fubumvc,代码行数:15,代码来源:NavigationRegistry_with_FubuRegistry_integration_testing.cs

示例5: import_with_strings_instead_of_StringToken

        public void import_with_strings_instead_of_StringToken()
        {
            var registry = new FubuRegistry();
            registry.Navigation(x =>
            {
                x.ForMenu("Key1");
                x.Add += MenuNode.Node("Key2");
                x.Add += MenuNode.Node("Key3");
            });

            registry.Import<ChildRegistry>();

            var graph = BehaviorGraph.BuildFrom(registry).Settings.Get<NavigationGraph>();

            graph.MenuFor("Key1").Select(x => x.Key)
                .ShouldHaveTheSameElementsAs(new NavigationKey("Key2"), new NavigationKey("Key3"));
        }
开发者ID:aluetjen,项目名称:fubumvc,代码行数:17,代码来源:NavigationRegistry_with_FubuRegistry_integration_testing.cs

示例6: import_navigation_from_child_registry

        public void import_navigation_from_child_registry()
        {
            var registry = new FubuRegistry();
            registry.Navigation(x =>
            {
                x.ForMenu(FakeKeys.Key1);
                x.Add += MenuNode.Node(FakeKeys.Key2);
                x.Add += MenuNode.Node(FakeKeys.Key3);
            });

            registry.Import<ChildRegistry>();

            var graph = BehaviorGraph.BuildFrom(registry).Settings.Get<NavigationGraph>();

            graph.MenuFor(FakeKeys.Key1).Select(x => x.Key)
                .ShouldHaveTheSameElementsAs(FakeKeys.Key2, FakeKeys.Key3, FakeKeys.Key4, FakeKeys.Key5);

            graph.MenuFor(FakeKeys.Key6).Select(x => x.Key)
                .ShouldHaveTheSameElementsAs(FakeKeys.Key7, FakeKeys.Key8);
        }
开发者ID:aluetjen,项目名称:fubumvc,代码行数:20,代码来源:NavigationRegistry_with_FubuRegistry_integration_testing.cs


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