System.Xml.Xsl.XmlILGenerator.EvaluateGlobalValues C# (CSharp) Méthode

EvaluateGlobalValues() private méthode

Generate code to force evaluation of some or all global variables and/or parameters.
private EvaluateGlobalValues ( IList iterList ) : void
iterList IList
Résultat void
        private void EvaluateGlobalValues(IList<QilNode> iterList) {
            MethodInfo methInfo;

            foreach (QilIterator ndIter in iterList) {
                // Evaluate global if generating debug code, or if global might have side effects
                if (this.qil.IsDebug || OptimizerPatterns.Read(ndIter).MatchesPattern(OptimizerPatternName.MaybeSideEffects)) {
                    // Get MethodInfo that evaluates the global value and discard its return value
                    methInfo = XmlILAnnotation.Write(ndIter).FunctionBinding;
                    Debug.Assert(methInfo != null, "MethodInfo for global value should have been created previously.");

                    this.helper.LoadQueryRuntime();
                    this.helper.Call(methInfo);
                    this.helper.Emit(OpCodes.Pop);
                }
            }
        }
    }