System.Xml.Xsl.Qil.SubstitutionList.FindReplacement C# (CSharp) Method

FindReplacement() public method

Find the replacement for a node
public FindReplacement ( QilNode n ) : QilNode
n QilNode the node to replace
return QilNode
        public QilNode FindReplacement(QilNode n) {
            Debug.Assert(s.Count % 2 == 0);
            for (int i = s.Count-2; i >= 0; i-=2)
                if (s[i] == n)
                    return (QilNode)s[i+1];
            return null;
        }
    }

Usage Example

Exemplo n.º 1
0
        //-----------------------------------------------
        // QilCloneVisitor methods
        //-----------------------------------------------

        /// <summary>
        /// Find the clone of an in-scope reference.
        /// </summary>
        protected QilNode FindClonedReference(QilNode node)
        {
            return(_subs.FindReplacement(node));
        }