System.Xml.Xsl.XsltOld.InputScope.ResolveVariable C# (CSharp) Method

ResolveVariable() public method

public ResolveVariable ( XmlQualifiedName qname ) : VariableAction
qname System.Xml.XmlQualifiedName
return VariableAction
        public VariableAction ResolveVariable(XmlQualifiedName qname) {
            for (InputScope inputScope = this; inputScope != null; inputScope = inputScope.Parent) {
                if (inputScope.Variables != null) {
                    VariableAction variable = (VariableAction) inputScope.Variables[qname];
                    if(variable != null) {
                        return variable;
                    }
                }
            }
            return null;
        }

Usage Example

Ejemplo n.º 1
0
        public VariableAction ResolveGlobalVariable(XmlQualifiedName qname)
        {
            InputScope prevScope = null;

            for (InputScope inputScope = this; inputScope != null; inputScope = inputScope.Parent)
            {
                prevScope = inputScope;
            }
            return(prevScope.ResolveVariable(qname));
        }