Type.GetMethodImpl 메서드

정의

오버로드

GetMethodImpl(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

파생 클래스에서 재정의되면 지정된 바인딩 제약 조건 및 호출 규칙을 활용하여, 매개 변수가 지정된 제네릭 매개 변수의 수, 인수 형식 및 한정자와 일치하는 지정된 메서드를 검색합니다.

GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

파생 클래스에서 재정의되면, 지정된 인수 형식 및 한정자와 일치하는 매개 변수를 가진 지정된 메서드를 지정된 바인딩 제약 조건 및 호출 규칙으로 검색합니다.

GetMethodImpl(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

Source:
Type.cs
Source:
Type.cs
Source:
Type.cs

파생 클래스에서 재정의되면 지정된 바인딩 제약 조건 및 호출 규칙을 활용하여, 매개 변수가 지정된 제네릭 매개 변수의 수, 인수 형식 및 한정자와 일치하는 지정된 메서드를 검색합니다.

protected:
 virtual System::Reflection::MethodInfo ^ GetMethodImpl(System::String ^ name, int genericParameterCount, System::Reflection::BindingFlags bindingAttr, System::Reflection::Binder ^ binder, System::Reflection::CallingConventions callConvention, cli::array <Type ^> ^ types, cli::array <System::Reflection::ParameterModifier> ^ modifiers);
protected virtual System.Reflection.MethodInfo? GetMethodImpl (string name, int genericParameterCount, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, System.Reflection.CallingConventions callConvention, Type[]? types, System.Reflection.ParameterModifier[]? modifiers);
protected virtual System.Reflection.MethodInfo GetMethodImpl (string name, int genericParameterCount, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetMethodImpl : string * int * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
override this.GetMethodImpl : string * int * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
Protected Overridable Function GetMethodImpl (name As String, genericParameterCount As Integer, bindingAttr As BindingFlags, binder As Binder, callConvention As CallingConventions, types As Type(), modifiers As ParameterModifier()) As MethodInfo

매개 변수

name
String

가져올 메서드의 이름이 포함된 문자열입니다.

genericParameterCount
Int32

메서드의 제네릭 형식 매개 변수의 수입니다.

bindingAttr
BindingFlags

검색 방법을 지정하는 열거형 값의 비트 조합입니다.

또는

null을 반환하는 Default입니다.

binder
Binder

속성 집합을 정의하고 바인딩을 활성화하는 개체입니다. 이 개체는 또한 리플렉션을 통해 오버로드된 메서드를 선택할 수 있고 인수 형식을 강제 변환할 수 있으며 멤버를 호출할 수도 있습니다.

또는

Nothing를 사용하려면 null 참조(Visual Basic의 경우 DefaultBinder)입니다.

callConvention
CallingConventions

인수의 순서 및 레이아웃, 반환 값의 전달 방법, 인수에 사용되는 레지스터, 스택을 정리하는 프로세스 등과 관련하여 사용할 규칙을 지정하는 개체입니다.

types
Type[]

가져올 메서드에 대한 매개 변수의 수, 차수, 형식 등을 나타내는 Type 개체 배열입니다.

또는

매개 변수를 사용하지 않는 메서드를 가져오기 위한 Type 형식의 빈 배열입니다(즉, Type[] types = new Type[0]).

또는

null. typesnull이면 일치되는 인수가 없습니다.

modifiers
ParameterModifier[]

ParameterModifier 배열에서 해당하는 요소와 연관된 특성을 나타내는 types 개체 배열입니다. 기본 바인더에서는 이 매개 변수를 처리하지 않습니다.

반환

(발견된 경우) 지정된 제네릭 매개 변수의 수, 인수 형식, 한정자, 바인딩 제약 조건 및 호출 규칙과 일치하는 메서드를 나타내는 개체입니다. 그 밖의 경우에는 null.

예외

메서드를 재정의하고 파생 클래스에서 호출해야 합니다.

적용 대상

GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])

Source:
Type.cs
Source:
Type.cs
Source:
Type.cs

파생 클래스에서 재정의되면, 지정된 인수 형식 및 한정자와 일치하는 매개 변수를 가진 지정된 메서드를 지정된 바인딩 제약 조건 및 호출 규칙으로 검색합니다.

protected:
 abstract 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);
protected abstract 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 abstract System.Reflection.MethodInfo GetMethodImpl (string name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConvention, Type[] types, System.Reflection.ParameterModifier[] modifiers);
abstract member GetMethodImpl : string * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
Protected MustOverride 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

검색 방법을 지정하는 열거형 값의 비트 조합입니다.

또는

null을 반환하는 Default입니다.

binder
Binder

속성 집합을 정의하고 바인딩을 활성화하는 개체입니다. 이 개체는 또한 리플렉션을 통해 오버로드된 메서드를 선택할 수 있고 인수 형식을 강제 변환할 수 있으며 멤버를 호출할 수도 있습니다.

또는

Nothing를 사용하려면 null 참조(Visual Basic의 경우 DefaultBinder)입니다.

callConvention
CallingConventions

인수의 순서 및 레이아웃, 반환 값의 전달 방법, 인수에 사용되는 레지스터, 스택을 정리하는 프로세스 등과 관련하여 사용할 규칙을 지정하는 개체입니다.

types
Type[]

가져올 메서드에 대한 매개 변수의 수, 차수, 형식 등을 나타내는 Type 개체 배열입니다.

또는

매개 변수를 사용하지 않는 메서드를 가져오기 위한 Type 형식의 빈 배열입니다(즉, Type[] types = new Type[0]).

또는

null. typesnull이면 일치되는 인수가 없습니다.

modifiers
ParameterModifier[]

ParameterModifier 배열에서 해당하는 요소와 연관된 특성을 나타내는 types 개체 배열입니다. 기본 바인더에서는 이 매개 변수를 처리하지 않습니다.

반환

지정된 요구 사항과 일치하는 메서드를 나타내는 개체이며(있는 경우), 이러한 개체가 없으면 null을 반환합니다.

예외

지정한 이름을 가지며 지정된 바인딩 제약 조건과 일치하는 메서드가 둘 이상 발견되었습니다.

name이(가) null인 경우

types가 다차원 배열인 경우

또는

modifiers가 다차원 배열인 경우

또는

typesmodifiers의 길이가 동일하지 않습니다.

설명

기본 바인더는 (modifiers매개 변수)를 처리하지 않지만 추상 System.Reflection.Binder 클래스를 사용하여 를 처리하는 ParameterModifiermodifiers사용자 지정 바인더를 작성할 수 있습니다. ParameterModifier 는 COM interop을 통해 호출할 때만 사용되며 참조로 전달되는 매개 변수만 처리됩니다.

typesnull이면 일치되는 인수가 없습니다.

다음 BindingFlags 필터 플래그를 사용하여 검색에 포함할 메서드를 정의할 수 있습니다.

  • 반환을 얻으려면 또는 BindingFlags.Static 를 지정 BindingFlags.Instance 해야 합니다.

  • 검색에 공용 메서드를 포함하도록 지정 BindingFlags.Public 합니다.

  • 검색에 public이 아닌 메서드(즉, 프라이빗, 내부 및 보호된 메서드)를 포함하도록 지정 BindingFlags.NonPublic 합니다.

  • 계층을 포함 public 하도록 지정 BindingFlags.FlattenHierarchy 하고 protected 정적 멤버를 지정합니다private. 상속된 클래스의 정적 멤버는 포함되지 않습니다.

다음 BindingFlags 한정자 플래그를 사용하여 검색 작동 방식을 변경할 수 있습니다.

  • BindingFlags.IgnoreCasename대/소문자를 무시합니다.

  • BindingFlags.DeclaredOnly 에 선언된 Type메서드만 검색하려면 이고, 단순히 상속된 메서드는 검색하지 않습니다.

자세한 내용은 System.Reflection.BindingFlags를 참조하세요.

추가 정보

적용 대상