System.Xml.Xsl.IlGen.XmlILVisitor.VisitNodeProperty C# (CSharp) Method

VisitNodeProperty() private method

Generate code to push the local name, namespace uri, or qname of the context navigator.
private VisitNodeProperty ( QilUnary ndProp ) : QilNode
ndProp QilUnary
return QilNode
        private QilNode VisitNodeProperty(QilUnary ndProp) {
            // Generate code to push argument onto stack
            NestedVisitEnsureStack(ndProp.Child);

            switch (ndProp.NodeType) {
                case QilNodeType.NameOf:
                    // push new XmlQualifiedName(navigator.LocalName, navigator.NamespaceURI);
                    this.helper.Emit(OpCodes.Dup);
                    this.helper.Call(XmlILMethods.NavLocalName);
                    this.helper.Call(XmlILMethods.NavNmsp);
                    this.helper.Construct(XmlILConstructors.QName);
                    this.iterCurr.Storage = StorageDescriptor.Stack(typeof(XmlQualifiedName), false);
                    break;

                case QilNodeType.LocalNameOf:
                    // push navigator.Name;
                    this.helper.Call(XmlILMethods.NavLocalName);
                    this.iterCurr.Storage = StorageDescriptor.Stack(typeof(string), false);
                    break;

                case QilNodeType.NamespaceUriOf:
                    // push navigator.NamespaceURI;
                    this.helper.Call(XmlILMethods.NavNmsp);
                    this.iterCurr.Storage = StorageDescriptor.Stack(typeof(string), false);
                    break;

                case QilNodeType.PrefixOf:
                    // push navigator.Prefix;
                    this.helper.Call(XmlILMethods.NavPrefix);
                    this.iterCurr.Storage = StorageDescriptor.Stack(typeof(string), false);
                    break;

                default:
                    Debug.Assert(false);
                    break;
            }

            return ndProp;
        }
XmlILVisitor