System.Xml.Xsl.IlGen.XmlILStateAnalyzer.AnalyzeConditional C# (CSharp) Method

AnalyzeConditional() protected method

Analyze conditional.
protected AnalyzeConditional ( QilTernary ndCond, XmlILConstructInfo info ) : void
ndCond System.Xml.Xsl.Qil.QilTernary
info XmlILConstructInfo
return void
        protected virtual void AnalyzeConditional(QilTernary ndCond, XmlILConstructInfo info) {
            PossibleXmlStates xstatesTrue;

            // Ensure that construct method is Writer
            info.ConstructMethod = XmlILConstructMethod.Writer;

            // Visit true branch; save resulting states
            ndCond.Center = AnalyzeContent(ndCond.Center);
            xstatesTrue = this.xstates;

            // Restore starting states and visit false branch
            this.xstates = info.InitialStates;
            ndCond.Right = AnalyzeContent(ndCond.Right);

            // Conditional ending states consist of combination of true and false branch states
            if (xstatesTrue != this.xstates)
                this.xstates = PossibleXmlStates.Any;
        }