/// <summary>
 /// Equivalent to OpCopier.Copy, only in addition it keeps track of the defining subtrees
 /// of collection vars defined in the subtree rooted at the copy of the input node n.
 /// </summary>
 /// <param name="cmd"></param>
 /// <param name="n"></param>
 /// <param name="varMap"></param>
 /// <param name="newCollectionVarDefinitions"></param>
 /// <returns></returns>
 internal static Node Copy(Command cmd, Node n, out VarMap varMap, out Dictionary<Var, Node> newCollectionVarDefinitions)
 {
     var oc = new OpCopierTrackingCollectionVars(cmd);
     var newNode = oc.CopyNode(n);
     varMap = oc.m_varMap;
     newCollectionVarDefinitions = oc.m_newCollectionVarDefinitions;
     return newNode;
 }
        /// <summary>
        ///     Equivalent to OpCopier.Copy, only in addition it keeps track of the defining subtrees
        ///     of collection vars defined in the subtree rooted at the copy of the input node n.
        /// </summary>
        internal static Node Copy(Command cmd, Node n, out VarMap varMap, out Dictionary <Var, Node> newCollectionVarDefinitions)
        {
            var oc      = new OpCopierTrackingCollectionVars(cmd);
            var newNode = oc.CopyNode(n);

            varMap = oc.m_varMap;
            newCollectionVarDefinitions = oc.m_newCollectionVarDefinitions;
            return(newNode);
        }
示例#3
0
        internal static System.Data.Entity.Core.Query.InternalTrees.Node Copy(
            Command cmd,
            System.Data.Entity.Core.Query.InternalTrees.Node n,
            out VarMap varMap,
            out Dictionary <Var, System.Data.Entity.Core.Query.InternalTrees.Node> newCollectionVarDefinitions)
        {
            OpCopierTrackingCollectionVars trackingCollectionVars = new OpCopierTrackingCollectionVars(cmd);

            System.Data.Entity.Core.Query.InternalTrees.Node node = trackingCollectionVars.CopyNode(n);
            varMap = trackingCollectionVars.m_varMap;
            newCollectionVarDefinitions = trackingCollectionVars.m_newCollectionVarDefinitions;
            return(node);
        }