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 MenuResolverCache(IChainResolver resolver, NavigationGraph graph) { _inner = new Lazy <NavigationGraph>(() => { graph.Compile(); graph.AllNodes().OfType <MenuNode>().Each(x => { try { x.Resolve(resolver); } catch (Exception ex) { throw new FubuException(4001, ex, "Failed to resolve a BehaviorChain for navigation element " + x.Key); } }); return(graph); }); }
public MenuResolverCache(IChainResolver resolver, NavigationGraph graph) { _inner = new Lazy<NavigationGraph>(() => { graph.Compile(); graph.AllNodes().OfType<MenuNode>().Each(x => { try { x.Resolve(resolver); } catch (Exception ex) { throw new FubuException(4001, ex, "Failed to resolve a BehaviorChain for navigation element " + x.Key); } }); return graph; }); }