Пример #1
0
        public void Configure(BehaviorGraph graph)
        {
            graph.Navigation.Compile();

            var resolver = new ChainResolutionCache(new TypeResolver(), graph);

            graph.Navigation.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);
                }

            });
        }
Пример #2
0
        private void resolve(MenuNode node, Action<BehaviorGraph> configure)
        {
            var graph = new BehaviorGraph();
            configure(graph);
            var resolver = new ChainResolutionCache(new TypeResolver(), graph);

            node.Resolve(resolver);
        }
 public void SetUp()
 {
     theCache = new ChainResolutionCache(new TypeResolver(), setupActions());
 }
 public void SetUp()
 {
     theCache = new ChainResolutionCache(setupActions());
 }