private static Dictionary <IToken, List <INode> > GroupNodes(this TreeContext context)
        {
            var nodes = context.Tree.Nodes.Values.Where(x => x != context.Tree.Root);
            var dict  = new Dictionary <IToken, List <INode> >();

            foreach (var node in nodes)
            {
                context.GetDependencies(node).ForEach(dependency => dict.GetList(dependency.Token).Add(node));
            }

            return(dict);
        }
예제 #2
0
 public static Node CreateNode(IToken token, IProvider provider, bool isNegative, TreeContext context)
 {
     return new Node(context.Tree, token, provider, isNegative, new NodeFilterInfo(context.Store, token), context.NextId);
 }