Share via


SignatureHelper.GetMethodSigHelper 方法

定義

傳回方法的簽章 Helper。

多載

GetMethodSigHelper(Module, Type, Type[])

傳回方法的簽章 Helper,該方法具有標準的呼叫慣例、指定的方法模組、傳回型別和引數型別。

GetMethodSigHelper(Module, CallingConvention, Type)

傳回方法的簽章 Helper,其會指定方法的模組、Unmanaged 呼叫慣例和傳回型別。

GetMethodSigHelper(CallingConvention, Type)

傳回方法的簽章 Helper,其會指定模組的 Unmanaged 呼叫慣例和傳回型別。

GetMethodSigHelper(CallingConventions, Type)

傳回方法的簽章 Helper,其會指定方法的呼叫慣例和傳回型別。

GetMethodSigHelper(Module, CallingConventions, Type)

指定方法的模組、呼叫慣例和傳回類型,以傳回方法的簽章協助程式。

GetMethodSigHelper(Module, Type, Type[])

來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs

傳回方法的簽章 Helper,該方法具有標準的呼叫慣例、指定的方法模組、傳回型別和引數型別。

public:
 static System::Reflection::Emit::SignatureHelper ^ GetMethodSigHelper(System::Reflection::Module ^ mod, Type ^ returnType, cli::array <Type ^> ^ parameterTypes);
public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper (System.Reflection.Module? mod, Type? returnType, Type[]? parameterTypes);
public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper (System.Reflection.Module mod, Type returnType, Type[] parameterTypes);
static member GetMethodSigHelper : System.Reflection.Module * Type * Type[] -> System.Reflection.Emit.SignatureHelper
Public Shared Function GetMethodSigHelper (mod As Module, returnType As Type, parameterTypes As Type()) As SignatureHelper

參數

mod
Module

ModuleBuilder,其中包含要為其要求 SignatureHelper 的方法。

returnType
Type

方法的傳回類型或 void 傳回類型的 null (在 Visual Basic 中為 Sub 程序)。

parameterTypes
Type[]

方法的引數型別,如果方法沒有引數則為 null

傳回

方法的 SignatureHelper 物件。

例外狀況

modnull

-或-

parameterTypes 的項目是 null

備註

此多載會建立具有標準呼叫慣例的簽章。

若要使用自定義修飾詞建立方法簽章,請使用 GetMethodSigHelper(Module, CallingConventions, Type) 方法多載,然後使用 AddArgument(Type, Type[], Type[])AddArguments(Type[], Type[][], Type[][]) 方法多載來新增具有自定義修飾詞的自變數。

適用於

GetMethodSigHelper(Module, CallingConvention, Type)

傳回方法的簽章 Helper,其會指定方法的模組、Unmanaged 呼叫慣例和傳回型別。

public:
 static System::Reflection::Emit::SignatureHelper ^ GetMethodSigHelper(System::Reflection::Module ^ mod, System::Runtime::InteropServices::CallingConvention unmanagedCallConv, Type ^ returnType);
public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper (System.Reflection.Module mod, System.Runtime.InteropServices.CallingConvention unmanagedCallConv, Type returnType);
static member GetMethodSigHelper : System.Reflection.Module * System.Runtime.InteropServices.CallingConvention * Type -> System.Reflection.Emit.SignatureHelper
Public Shared Function GetMethodSigHelper (mod As Module, unmanagedCallConv As CallingConvention, returnType As Type) As SignatureHelper

參數

mod
Module

ModuleBuilder,其中包含要為其要求 SignatureHelper 的方法。

unmanagedCallConv
CallingConvention

方法的 Unmanaged 呼叫慣例。

returnType
Type

方法的傳回類型或 void 傳回類型的 null (在 Visual Basic 中為 Sub 程序)。

傳回

方法的 SignatureHelper 物件。

例外狀況

modnull

mod 不是 ModuleBuilder

-或-

unmanagedCallConv 為未知的 Unmanaged 呼叫慣例。

適用於

GetMethodSigHelper(CallingConvention, Type)

傳回方法的簽章 Helper,其會指定模組的 Unmanaged 呼叫慣例和傳回型別。

public:
 static System::Reflection::Emit::SignatureHelper ^ GetMethodSigHelper(System::Runtime::InteropServices::CallingConvention unmanagedCallingConvention, Type ^ returnType);
public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper (System.Runtime.InteropServices.CallingConvention unmanagedCallingConvention, Type returnType);
static member GetMethodSigHelper : System.Runtime.InteropServices.CallingConvention * Type -> System.Reflection.Emit.SignatureHelper
Public Shared Function GetMethodSigHelper (unmanagedCallingConvention As CallingConvention, returnType As Type) As SignatureHelper

參數

unmanagedCallingConvention
CallingConvention

方法的 Unmanaged 呼叫慣例。

returnType
Type

方法的傳回類型或 void 傳回類型的 null (在 Visual Basic 中為 Sub 程序)。

傳回

方法的 SignatureHelper 物件。

例外狀況

unmanagedCallConv 為未知的 Unmanaged 呼叫慣例。

適用於

GetMethodSigHelper(CallingConventions, Type)

來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs

傳回方法的簽章 Helper,其會指定方法的呼叫慣例和傳回型別。

public:
 static System::Reflection::Emit::SignatureHelper ^ GetMethodSigHelper(System::Reflection::CallingConventions callingConvention, Type ^ returnType);
public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper (System.Reflection.CallingConventions callingConvention, Type? returnType);
public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper (System.Reflection.CallingConventions callingConvention, Type returnType);
static member GetMethodSigHelper : System.Reflection.CallingConventions * Type -> System.Reflection.Emit.SignatureHelper
Public Shared Function GetMethodSigHelper (callingConvention As CallingConventions, returnType As Type) As SignatureHelper

參數

callingConvention
CallingConventions

方法的呼叫慣例。

returnType
Type

方法的傳回類型或 void 傳回類型的 null (在 Visual Basic 中為 Sub 程序)。

傳回

方法的 SignatureHelper 物件。

適用於

GetMethodSigHelper(Module, CallingConventions, Type)

來源:
SignatureHelper.cs
來源:
SignatureHelper.cs
來源:
SignatureHelper.cs

指定方法的模組、呼叫慣例和傳回類型,以傳回方法的簽章協助程式。

public:
 static System::Reflection::Emit::SignatureHelper ^ GetMethodSigHelper(System::Reflection::Module ^ mod, System::Reflection::CallingConventions callingConvention, Type ^ returnType);
public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper (System.Reflection.Module? mod, System.Reflection.CallingConventions callingConvention, Type? returnType);
public static System.Reflection.Emit.SignatureHelper GetMethodSigHelper (System.Reflection.Module mod, System.Reflection.CallingConventions callingConvention, Type returnType);
static member GetMethodSigHelper : System.Reflection.Module * System.Reflection.CallingConventions * Type -> System.Reflection.Emit.SignatureHelper
Public Shared Function GetMethodSigHelper (mod As Module, callingConvention As CallingConventions, returnType As Type) As SignatureHelper

參數

mod
Module

ModuleBuilder,其中包含要為其要求 SignatureHelper 的方法。

callingConvention
CallingConventions

方法的呼叫慣例。

returnType
Type

方法的傳回類型或 void 傳回類型的 null (在 Visual Basic 中為 Sub 程序)。

傳回

方法的 SignatureHelper 物件。

例外狀況

modnull

適用於