Ejemplo n.º 1
0
        public virtual MethodInfo[] GetMethods(BindingFlags bindingFlags)
        {
            RuntimeModule module = this as RuntimeModule;

            if (module == null)
            {
                throw new NotImplementedException();
            }
            return(module.GetMethods(bindingFlags));
        }
Ejemplo n.º 2
0
        /// <summary>返回在模块中定义的全局方法,这些方法与指定的绑定标志匹配。</summary>
        /// <returns>一个 <see cref="T:System.Reflection.MethodInfo" /> 类型的数组,该类型表示在模块中定义的全局方法,这些方法与指定的绑定标志匹配;如果不存在与这些绑定标志匹配的全局方法,则返回一个空数组。</returns>
        /// <param name="bindingFlags">用来限制搜索的 <see cref="T:System.Reflection.BindingFlags" /> 值的按位组合。</param>
        public virtual MethodInfo[] GetMethods(BindingFlags bindingFlags)
        {
            RuntimeModule runtimeModule = this as RuntimeModule;

            if ((Module)runtimeModule != (Module)null)
            {
                return(runtimeModule.GetMethods(bindingFlags));
            }
            throw new NotImplementedException();
        }
Ejemplo n.º 3
0
        public virtual MethodInfo[] GetMethods(BindingFlags bindingFlags)
        {
            // This API was made virtual in V4. Code compiled against V2 might use
            // "call" rather than "callvirt" to call it.
            // This makes sure those code still works.
            RuntimeModule rtModule = this as RuntimeModule;

            if (rtModule != null)
            {
                return(rtModule.GetMethods(bindingFlags));
            }

            throw new NotImplementedException();
        }