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

VisitEmpty() private method

Generate code for the empty sequence.
private VisitEmpty ( QilNode nd ) : void
nd QilNode
return void
        private void VisitEmpty(QilNode nd) {
            Debug.Assert(XmlILConstructInfo.Read(nd).PullFromIteratorFirst, "VisitEmpty should only be called if items are iterated");

            // IL's rules prevent OpCodes.Br here
            // Empty sequence
            this.helper.EmitUnconditionalBranch(OpCodes.Brtrue, this.iterCurr.GetLabelNext());

            // Push dummy value so that Location is not None and IL rules are met
            this.helper.Emit(OpCodes.Ldnull);
            this.iterCurr.Storage = StorageDescriptor.Stack(typeof(XPathItem), false);
        }
XmlILVisitor