TypeDelegator.GetMethodImpl 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用指定的绑定约束和指定的调用约定搜索其参数与指定参数类型和修饰符匹配的指定方法。
protected:
override System::Reflection::MethodInfo ^ GetMethodImpl(System::String ^ name, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, System::Reflection::CallingConventions callConvention, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods)]
protected override System.Reflection.MethodInfo? GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, System.Reflection.CallingConventions callConvention, Type[]? types, System.Reflection.ParameterModifier[]? modifiers);
protected override System.Reflection.MethodInfo GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[] modifiers);
protected override System.Reflection.MethodInfo? GetMethodImpl(string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, System.Reflection.CallingConventions callConvention, Type[]? types, System.Reflection.ParameterModifier[]? modifiers);
[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods)>]
override this.GetMethodImpl : string * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
override this.GetMethodImpl : string * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
Protected Overrides Function GetMethodImpl (name As String, bindingAttr As BindingFlags, binder As Binder, callConvention As CallingConventions, types As Type(), modifiers As ParameterModifier()) As MethodInfo
参数
- name
- String
方法名称。
- bindingAttr
- BindingFlags
影响搜索执行方式的位掩码。 该值是零个或多个位 BindingFlags标志的组合。
- binder
- Binder
一个对象,它允许绑定、强制参数类型、调用成员以及使用反射检索 MemberInfo 对象。
binder如果是null,则使用默认绑定器。
- callConvention
- CallingConventions
调用约定。
- types
- Type[]
包含 Type 参数编号、顺序和类型的列表的类型数组。 类型不能; null使用适当的 GetMethod 方法或空数组搜索没有参数的方法。
- modifiers
- ParameterModifier[]
类型与数组具有相同长度ParameterModifier的types数组,其元素表示与要获取的方法的参数关联的属性。
返回
MethodInfoInfo与指定条件匹配的实现方法的对象,或者null找不到匹配项。
- 属性
注解
该 callConvention 参数指示入口点的调用约定。
CallingConventions如果未指定,则使用默认值CallingConventionsStandard。