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

CopySequence() private method

Iterate over items produced by the "nd" expression and copy each item to output.
private CopySequence ( QilNode nd ) : void
nd QilNode
return void
        private void CopySequence(QilNode nd) {
            XmlQueryType typ = nd.XmlType;
            bool hasOnEnd;
            Label lblOnEnd;

            StartWriterLoop(nd, out hasOnEnd, out lblOnEnd);

            if (typ.IsSingleton) {
                // Always write atomic values via XmlQueryOutput
                this.helper.LoadQueryOutput();

                // Allow base internal class to dispatch to correct Visit method
                base.Visit(nd);
                this.iterCurr.EnsureItemStorageType(nd.XmlType, typeof(XPathItem));
            }
            else {
                // Allow base internal class to dispatch to correct Visit method
                base.Visit(nd);
                this.iterCurr.EnsureItemStorageType(nd.XmlType, typeof(XPathItem));

                // Save any stack values in a temporary local
                this.iterCurr.EnsureNoStackNoCache("$$$copyTemp");

                this.helper.LoadQueryOutput();
            }

            // Write value to output
            this.iterCurr.EnsureStackNoCache();
            this.helper.Call(XmlILMethods.WriteItem);

            EndWriterLoop(nd, hasOnEnd, lblOnEnd);
        }
XmlILVisitor