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

VisitTrue() protected method

Generate code for QilNodeType.True.
BranchingContext.OnFalse context: [nothing] BranchingContext.OnTrue context: goto LabelParent; BranchingContext.None context: push true();
protected VisitTrue ( QilNode ndTrue ) : QilNode
ndTrue QilNode
return QilNode
        protected override QilNode VisitTrue(QilNode ndTrue) {
            if (this.iterCurr.CurrentBranchingContext != BranchingContext.None) {
                // Make sure there's an IL code path to both the true and false branches in order to avoid dead
                // code which can cause IL verification errors.
                this.helper.EmitUnconditionalBranch(this.iterCurr.CurrentBranchingContext == BranchingContext.OnTrue ?
                        OpCodes.Brtrue : OpCodes.Brfalse, this.iterCurr.LabelBranch);

                this.iterCurr.Storage = StorageDescriptor.None();
            }
            else {
                // Push boolean result onto the stack
                this.helper.LoadBoolean(true);
                this.iterCurr.Storage = StorageDescriptor.Stack(typeof(bool), false);
            }

            return ndTrue;
        }
XmlILVisitor