当前位置: 首页>>代码示例>>C#>>正文


C# Node.GetExtendedNodeInfo方法代码示例

本文整理汇总了C#中System.Data.Query.InternalTrees.Node.GetExtendedNodeInfo方法的典型用法代码示例。如果您正苦于以下问题:C# Node.GetExtendedNodeInfo方法的具体用法?C# Node.GetExtendedNodeInfo怎么用?C# Node.GetExtendedNodeInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Data.Query.InternalTrees.Node的用法示例。


在下文中一共展示了Node.GetExtendedNodeInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetKeys

 /// <summary>
 /// Pull up keys (if possible) for the given node
 /// </summary>
 /// <param name="node">node to pull up keys for</param>
 /// <returns>Keys for the node</returns>
 internal KeyVec GetKeys(Node node)
 {
     ExtendedNodeInfo nodeInfo = node.GetExtendedNodeInfo(m_command);
     if (nodeInfo.Keys.NoKeys)
     {
         VisitNode(node);
     }
     return nodeInfo.Keys;
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:14,代码来源:KeyPullup.cs

示例2: ProjectOpCase1


//.........这里部分代码省略.........
                        && referencedVars.Count == 0)
                    {
                        // We'll just pick the NestNode; we expect MergeNestedNestOps to merge
                        // it into what we're about to generate later.
                        projectNode = projectNode.Child0;
                        EnsureReferencedVarsAreRemoved(referencedVars, outputVars);
                    }
                    else
                    {
                        var nestedNestOp = (NestBaseOp)projectNode.Child0.Op;

                        // Build the new ProjectOp to be used as input to the new nestedNestOp; 
                        // it's input is the input to the current nestedNestOp and a new 
                        // VarDefList with only the vars that were defined on the top level 
                        // ProjectOp.
                        var newNestedProjectNodeInputs = new List<Node>();
                        newNestedProjectNodeInputs.Add(projectNode.Child0.Child0);
                        referencedVars.AddRange(definedVars);
                        newNestedProjectNodeInputs.Add(Command.CreateNode(Command.CreateVarDefListOp(), referencedVars));

                        var newNestedProjectOutputs = Command.CreateVarVec(nestedNestOp.Outputs);

                        // SQLBUDT #508722:  We need to remove the collection vars, 
                        //  these are not produced by the project
                        foreach (var ci in nestedNestOp.CollectionInfo)
                        {
                            newNestedProjectOutputs.Clear(ci.CollectionVar);
                        }

                        foreach (var varDefNode in referencedVars)
                        {
                            newNestedProjectOutputs.Set(((VarDefOp)varDefNode.Op).Var);
                        }

                        var newNestedProjectNode = Command.CreateNode(
                            Command.CreateProjectOp(newNestedProjectOutputs), newNestedProjectNodeInputs);

                        // Now build the new nestedNestedNestOp, with the new nestedProjectOp
                        // as it's input; we have to update the outputs of the NestOp to include
                        // the vars we pushed down.
                        var newNestedNestOutputs = Command.CreateVarVec(newNestedProjectOutputs);
                        newNestedNestOutputs.Or(nestedNestOp.Outputs);

                        var newNestedNestOp = Command.CreateMultiStreamNestOp(
                            nestedNestOp.PrefixSortKeys,
                            newNestedNestOutputs,
                            nestedNestOp.CollectionInfo);

                        var newNestedNestNodeInputs = new List<Node>();
                        newNestedNestNodeInputs.Add(newNestedProjectNode);
                        for (var j = 1; j < projectNode.Child0.Children.Count; j++)
                        {
                            newNestedNestNodeInputs.Add(projectNode.Child0.Children[j]);
                        }
                        projectNode = Command.CreateNode(newNestedNestOp, newNestedNestNodeInputs);
                        // We don't need to remove or remap referenced vars here because
                        // we're including them on the node we create; they won't become
                        // invalid.
                    }
                }
                else
                {
                    var newProjectOp = Command.CreateProjectOp(newProjectVars);
                    projectNode.Child1 = Command.CreateNode(projectNode.Child1.Op, newChildren);
                    projectNode.Op = newProjectOp;
                    EnsureReferencedVarsAreRemapped(referencedVars);
                }
            }
            else
            {
                projectNode = projectNode.Child0;
                EnsureReferencedVarsAreRemoved(referencedVars, outputVars);
            }

            // We need to make sure that we project out any external references to the driving
            // node that the nested collections have, or we're going to end up with unresolvable
            // vars when we pull them up over the current driving node.  Of course, we only 
            // want the references that are actually ON the driving node.
            externalReferences.And(projectNode.GetExtendedNodeInfo(Command).Definitions);
            outputVars.Or(externalReferences);

            // There are currently no prefix sortkeys. The processing for a SortOp may later
            // introduce some prefix sortkeys, but there aren't any now.
            var nestOp = Command.CreateMultiStreamNestOp(new List<SortKey>(), outputVars, collectionInfoList);

            // Insert the current node at the head of the the list of collections
            collectionNodes.Insert(0, projectNode);
            var nestNode = Command.CreateNode(nestOp, collectionNodes);

            // Finally, recompute node info
            Command.RecomputeNodeInfo(projectNode);
            Command.RecomputeNodeInfo(nestNode);

#if DEBUG
            var size = input.Length; // GC.KeepAlive makes FxCop Grumpy.
            var output = Dump.ToXml(nestNode);
#endif
            //DEBUG
            return nestNode;
        }
开发者ID:jimmy00784,项目名称:entityframework,代码行数:101,代码来源:NestPullup.cs

示例3: GetExtendedNodeInfo

 /// <summary>
 /// Get extended node information for a RelOpNode
 /// </summary>
 /// <param name="n">the node</param>
 /// <returns>extended node info for this node</returns>
 internal ExtendedNodeInfo GetExtendedNodeInfo(Node n)
 {
     return n.GetExtendedNodeInfo(this);
 }
开发者ID:uQr,项目名称:referencesource,代码行数:9,代码来源:Command.cs


注:本文中的System.Data.Query.InternalTrees.Node.GetExtendedNodeInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。