System.Xml.Xsl.XPath.XPathContext.GetCurrentNode C# (CSharp) Method

GetCurrentNode() public static method

public static GetCurrentNode ( QilTuple context ) : QilNode
context QilTuple
return QilNode
        public static QilNode GetCurrentNode(QilTuple context) {
            Debug.Assert(context != null);
            Debug.Assert(GetTuple(context).For.Type == QilNodeType.For);
            return GetTuple(context).For;
        }

Usage Example

Ejemplo n.º 1
0
 public static QilNode GetCurrentPosition(QilFactory f, QilTuple context)
 {
     Debug.Assert(context != null);
     if (context.Where.Type != QilNodeType.True)
     {
         Debug.Assert(context.For.Type == QilNodeType.For);
         // convert context (1) --> (2)
         QilIterator for2 = f.For(context.For.Binding);
         QilNode     cnd2 = new Replacer(f).Replace(/*inExpr:*/ context.Where, /*from:*/ context.For, /*to:*/ for2);
         context.For.Binding = f.OldTuple(for2, cnd2, for2);
         context.Where       = f.True();
     }
     return(f.Convert(f.PositionOf((QilIterator)XPathContext.GetCurrentNode(context)), f.TypeFactory.Double()));
 }