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

VisitXsltCopy() protected method

Generate code for QilNodeType.XsltCopy.
protected VisitXsltCopy ( QilBinary ndCopy ) : QilNode
ndCopy QilBinary
return QilNode
        protected override QilNode VisitXsltCopy(QilBinary ndCopy) {
            Label lblSkipContent = this.helper.DefineLabel();
            Debug.Assert(XmlILConstructInfo.Read(ndCopy).PushToWriterFirst);

            // if (!xwrtChk.StartCopyChk(navCopy)) goto LabelSkipContent;
            this.helper.LoadQueryOutput();

            NestedVisitEnsureStack(ndCopy.Left);
            Debug.Assert(ndCopy.Left.XmlType.IsNode);

            this.helper.Call(XmlILMethods.StartCopy);
            this.helper.Emit(OpCodes.Brfalse, lblSkipContent);

            // Recursively construct content
            NestedVisit(ndCopy.Right);

            // xwrtChk.EndCopyChk(navCopy);
            this.helper.LoadQueryOutput();

            NestedVisitEnsureStack(ndCopy.Left);
            Debug.Assert(ndCopy.Left.XmlType.IsNode);

            this.helper.Call(XmlILMethods.EndCopy);

            // LabelSkipContent:
            this.helper.MarkLabel(lblSkipContent);

            this.iterCurr.Storage = StorageDescriptor.None();
            return ndCopy;
        }
XmlILVisitor