public NavigationService(BehaviorGraph graph, ICurrentHttpRequest request, IMenuStateService stateService, IUrlRegistry urls) { _request = request; _stateService = stateService; _urls = urls; _navigation = graph.Settings.Get<NavigationGraph>(); }
public NavigationService(BehaviorGraph graph, ICurrentHttpRequest request, IMenuStateService stateService, IUrlRegistry urls) { _request = request; _stateService = stateService; _urls = urls; _navigation = graph.Settings.Get <NavigationGraph>(); }
public void add_node_and_parent_does_not_exist() { var graph = new NavigationGraph(); var node = MenuNode.Node(FakeKeys.Key1); graph.AddNode(FakeKeys.Key2, node); graph.MenuFor(FakeKeys.Key2).Top .ShouldBeTheSameAs(node); }
public void Configure(NavigationGraph graph) { var dependency = graph.AllNodes().FirstOrDefault(node => _matcher.Matches(node.Key)); // code was like this for debugging if (dependency == null) { dependency = graph.MenuFor(_matcher.DefaultKey()); } _strategy.Apply(dependency, _node); }
public void add_node_to_another_node() { var graph = new NavigationGraph(); var parentNode = MenuNode.Node(FakeKeys.Key1); graph.AddNode(FakeKeys.Key2, parentNode); var childNode = MenuNode.Node(FakeKeys.Key3); graph.AddNode(FakeKeys.Key1, childNode); parentNode.Children.Top .ShouldBeTheSameAs(childNode); }
internal void Configure(NavigationGraph graph) { _modifications.Each(x => x(graph)); }
public void Configure(ActionCall action, MenuItemAttribute att, NavigationGraph graph) { var registrations = att.ToMenuRegistrations(action.ParentChain()); graph.AddRegistrations(registrations); }
internal void Configure(NavigationGraph graph) { graph.AddRegistrations(_registrations); }
public void SetUp() { graph = new NavigationGraph(x => { x.ForMenu(FakeKeys.Key1); x.Add += MenuNode.Node(FakeKeys.Key2); x.Add += MenuNode.Node(FakeKeys.Key3); x.Add += MenuNode.Node(FakeKeys.Key4); x.ForMenu(FakeKeys.Key5); x.Add += MenuNode.Node(FakeKeys.Key6); x.Add += MenuNode.Node(FakeKeys.Key7); x.ForMenu(FakeKeys.Key2); x.Add += MenuNode.Node(FakeKeys.Key8); x.Add += MenuNode.Node(FakeKeys.Key9); x.ForMenu(FakeKeys.Key9); x.Add += MenuNode.Node(FakeKeys.Key10); }); }