System.Xml.Xsl.XsltOld.InputScope.ResolveVariable C# (CSharp) 메소드

ResolveVariable() 공개 메소드

public ResolveVariable ( XmlQualifiedName qname ) : VariableAction
qname System.Xml.XmlQualifiedName
리턴 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

예제 #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));
        }