本文整理汇总了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");
});
}
示例2: Configure
public void Configure(FubuRegistry registry)
{
registry.ApplyConvention<AuthorizationConvention>();
registry.Navigation<AuthorizationNavigationRegistry>();
registry.Services(x =>
{
x.ReplaceService<IAuthorizationFailureHandler,AuthorizationFailureHandler>();
});
}
示例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>();
}
示例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