System.Xml.Xsl.XmlILGenerator.CreateExecuteFunction C# (CSharp) Method

CreateExecuteFunction() private method

Create and generate the "Execute" method, which is the entry point to the query.
private CreateExecuteFunction ( MethodInfo methRoot ) : MethodInfo
methRoot System.Reflection.MethodInfo
return System.Reflection.MethodInfo
        private MethodInfo CreateExecuteFunction(MethodInfo methRoot) {
            MethodInfo methExec;

            // public static void Execute(XmlQueryRuntime);
            methExec = this.module.DefineMethod(
                            "Execute",
                            typeof(void),
                            new Type[] {},
                            new string[] {},
                            XmlILMethodAttributes.NonUser);

            this.helper.MethodBegin(methExec, null, false);

            // Force some or all global values to be evaluated at start of query
            EvaluateGlobalValues(this.qil.GlobalVariableList);
            EvaluateGlobalValues(this.qil.GlobalParameterList);

            // Root(runtime);
            this.helper.LoadQueryRuntime();
            this.helper.Call(methRoot);

            this.helper.MethodEnd();

            return methExec;
        }