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

VisitDocumentCtor() protected method

Generate code for QilNodeType.DocumentCtor.
protected VisitDocumentCtor ( QilUnary ndDoc ) : QilNode
ndDoc System.Xml.Xsl.Qil.QilUnary
return QilNode
        protected override QilNode VisitDocumentCtor(QilUnary ndDoc) {
            Debug.Assert(XmlILConstructInfo.Read(ndDoc).PushToWriterFirst, "Document root construction should always be pushed to writer.");

            // Generate call to XmlQueryOutput.WriteStartRootChk
            this.helper.CallWriteStartRoot();

            // Recursively construct content
            NestedVisit(ndDoc.Child);

            // Generate call to XmlQueryOutput.WriteEndRootChk
            this.helper.CallWriteEndRoot();

            this.iterCurr.Storage = StorageDescriptor.None();

            return ndDoc;
        }
XmlILVisitor