Type.GetMethodImpl メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| 名前 | 説明 |
|---|---|
| GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) |
派生クラスでオーバーライドされると、指定したバインディング制約と指定した呼び出し規則を使用して、指定した引数の型と修飾子と一致するパラメーターを持つ指定したメソッドを検索します。 |
| GetMethodImpl(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[]) |
派生クラスでオーバーライドされた場合、指定したバインディング制約と指定した呼び出し規則を使用して、指定したジェネリック パラメーター数、引数の型、および修飾子と一致するパラメーターを持つ、指定したメソッドを検索します。 |
GetMethodImpl(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
- ソース:
- Type.cs
- ソース:
- Type.cs
- ソース:
- Type.cs
- ソース:
- Type.cs
- ソース:
- 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);
[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods)]
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);
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);
[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods)>]
abstract member GetMethodImpl : string * System.Reflection.BindingFlags * System.Reflection.Binder * System.Reflection.CallingConventions * Type[] * System.Reflection.ParameterModifier[] -> System.Reflection.MethodInfo
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
取得するメソッドの名前を含む文字列。
- binder
- Binder
一連のプロパティを定義し、バインディングを有効にするオブジェクト。これには、オーバーロードされたメソッドの選択、引数型の強制型の強制、リフレクションによるメンバーの呼び出しが含まれる場合があります。
-又は-
DefaultBinder を使用するための null 参照 (Visual Basic の Nothing)。
- callConvention
- CallingConventions
引数の順序とレイアウト、戻り値の受け渡し方法、引数に使用されるレジスタ、スタックをクリーンアップするプロセスに関して使用する規則のセットを指定するオブジェクト。
- types
- Type[]
取得するメソッドのパラメーターの数、順序、および型を表す Type オブジェクトの配列。
-又は-
パラメーターを受け取っていないメソッドを取得 Type 型の空の配列 (つまり、Type[] 型 = 新しい Type[0])。
-又は-
null。
typesがnullの場合、引数は一致しません。
- modifiers
- ParameterModifier[]
ParameterModifier配列内の対応する要素に関連付けられた属性を表すtypes オブジェクトの配列。 既定のバインダーでは、このパラメーターは処理されません。
返品
指定した要件に一致するメソッドを表すオブジェクト (見つかった場合)。それ以外の場合は null。
- 属性
例外
指定した名前を持ち、指定したバインディング制約に一致する複数のメソッドが見つかりました。
name は nullです。
現在の型は、 TypeBuilder または GenericTypeParameterBuilderです。
注釈
既定のバインダーは ParameterModifier ( modifiers パラメーター) を処理しませんが、抽象 System.Reflection.Binder クラスを使用して、 modifiersを処理するカスタム バインダーを記述できます。
ParameterModifier は COM 相互運用機能を介して呼び出すときにのみ使用され、参照渡しのパラメーターのみが処理されます。
typesがnullの場合、引数は一致しません。
次の BindingFlags フィルター フラグを使用して、検索に含めるメソッドを定義できます。
戻り値を取得するには、
BindingFlags.InstanceまたはBindingFlags.Staticを指定する必要があります。検索にパブリック メソッドを含める
BindingFlags.Publicを指定します。BindingFlags.NonPublicを指定して、非パブリック メソッド (プライベート、内部、および保護されたメソッド) を検索に含めます。BindingFlags.FlattenHierarchyおよびpublic静的メンバーを階層に含めるprotectedを指定します。継承されたクラスprivate静的メンバーは含まれません。
次の BindingFlags 修飾子フラグを使用して、検索の動作を変更できます。
BindingFlags.IgnoreCaseの大文字と小文字を無視するにはname。BindingFlags.DeclaredOnly単に継承されたメソッドではなく、 Typeで宣言されたメソッドのみを検索する場合。
詳細については、System.Reflection.BindingFlags を参照してください。
こちらもご覧ください
- MethodInfo
- String
- BindingFlags
- Binder
- DefaultBinder
- CallingConventions
- ParameterModifier
- GetMethod(String, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
- GetMethods()
適用対象
GetMethodImpl(String, Int32, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
- ソース:
- Type.cs
- ソース:
- Type.cs
- ソース:
- Type.cs
- ソース:
- Type.cs
- ソース:
- 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);
[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods)]
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);
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);
[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicMethods | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicMethods)>]
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
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
メソッドのジェネリック型パラメーターの数。
- binder
- Binder
一連のプロパティを定義し、バインディングを有効にするオブジェクト。これには、オーバーロードされたメソッドの選択、引数型の強制型の強制、リフレクションによるメンバーの呼び出しが含まれる場合があります。
-又は-
DefaultBinder を使用するための null 参照 (Visual Basic の Nothing)。
- callConvention
- CallingConventions
引数の順序とレイアウト、戻り値の受け渡し方法、引数に使用されるレジスタ、スタックをクリーンアップするプロセスに関して使用する規則のセットを指定するオブジェクト。
- types
- Type[]
取得するメソッドのパラメーターの数、順序、および型を表す Type オブジェクトの配列。
-又は-
パラメーターを受け取っていないメソッドを取得 Type 型の空の配列 (つまり、Type[] 型 = 新しい Type[0])。
-又は-
null。
typesがnullの場合、引数は一致しません。
- modifiers
- ParameterModifier[]
ParameterModifier配列内の対応する要素に関連付けられた属性を表すtypes オブジェクトの配列。 既定のバインダーでは、このパラメーターは処理されません。
返品
指定したジェネリック パラメーター数、引数の型、修飾子、バインド制約、呼び出し規則 (見つかった場合) に一致するメソッドを表すオブジェクト。それ以外の場合は null。
- 属性
例外
メソッドをオーバーライドし、派生クラスで呼び出す必要があります。