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

CreateGlobalValueMetadata() private method

Generate metadata for a method that calculates a global value.
private CreateGlobalValueMetadata ( IList globalList ) : void
globalList IList
return void
        private void CreateGlobalValueMetadata(IList<QilNode> globalList) {
            MethodInfo methInfo;
            Type typReturn;
            XmlILMethodAttributes methAttrs;

            foreach (QilReference ndRef in globalList) {
                // public T GlobalValue()
                typReturn = XmlILTypeHelper.GetStorageType(ndRef.XmlType);
                methAttrs = ndRef.SourceLine == null ? XmlILMethodAttributes.NonUser : XmlILMethodAttributes.None;
                methInfo = this.module.DefineMethod(ndRef.DebugName.ToString(), typReturn, new Type[] {}, new string[] {}, methAttrs);

                // Annotate function with MethodBuilder
                XmlILAnnotation.Write(ndRef).FunctionBinding = methInfo;
            }
        }