SignatureHelper.GetMethodSigHelper 方法

定义

返回方法的签名帮助程序。Returns a signature helper for a method.

重载

GetMethodSigHelper(Module, Type, Type[])

已知方法的模块、返回类型和参数类型,返回具有标准调用约定的方法的签名帮助程序。Returns a signature helper for a method with a standard calling convention, given the method's module, return type, and argument types.

GetMethodSigHelper(Module, CallingConvention, Type)

已知方法的模块、非托管调用约定和返回类型,返回方法的签名帮助程序。Returns a signature helper for a method given the method's module, unmanaged calling convention, and return type.

GetMethodSigHelper(CallingConvention, Type)

已知方法的非托管调用约定和返回类型,返回方法的签名帮助程序。Returns a signature helper for a method given the method's unmanaged calling convention and return type.

GetMethodSigHelper(CallingConventions, Type)

已知方法的调用约定和返回类型,返回方法的签名帮助程序。Returns a signature helper for a method given the method's calling convention and return type.

GetMethodSigHelper(Module, CallingConventions, Type)

在给定了方法的模块、调用约定和返回类型的情况下,返回方法的签名帮助程序。Returns a signature helper for a method given the method's module, calling convention, and return type.

GetMethodSigHelper(Module, Type, Type[])

已知方法的模块、返回类型和参数类型,返回具有标准调用约定的方法的签名帮助程序。Returns a signature helper for a method with a standard calling convention, given the method's module, return type, and argument types.

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

包含 SignatureHelper 请求的方法的 ModuleBuilderThe ModuleBuilder that contains the method for which the SignatureHelper is requested.

returnType
Type

方法的返回类型,对于 void 返回类型为 null(在 Visual Basic 中为 Sub 过程)。The return type of the method, or null for a void return type (Sub procedure in Visual Basic).

parameterTypes
Type[]

方法的参数类型,如果方法没有参数,则为 nullThe types of the arguments of the method, or null if the method has no arguments.

返回

SignatureHelper

方法的 SignatureHelper 对象。The SignatureHelper object for a method.

例外

modnullmod is null.

- 或 --or- parameterTypes 的元素为 nullAn element of parameterTypes is null.

mod 不是 ModuleBuildermod is not a ModuleBuilder.

注解

此重载使用标准调用约定创建签名。This overload creates a signature with a standard calling convention.

若要创建具有自定义修饰符的方法签名,请使用 GetMethodSigHelper(Module, CallingConventions, Type) 方法重载,然后使用 AddArgument(Type, Type[], Type[])AddArguments(Type[], Type[][], Type[][]) 方法重载添加具有自定义修饰符的参数。To create a method signature with custom modifiers, use the GetMethodSigHelper(Module, CallingConventions, Type) method overload and then use the AddArgument(Type, Type[], Type[]) or AddArguments(Type[], Type[][], Type[][]) method overloads to add arguments with custom modifiers.

适用于

GetMethodSigHelper(Module, CallingConvention, Type)

已知方法的模块、非托管调用约定和返回类型,返回方法的签名帮助程序。Returns a signature helper for a method given the method's module, unmanaged calling convention, and return type.

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

包含 SignatureHelper 请求的方法的 ModuleBuilderThe ModuleBuilder that contains the method for which the SignatureHelper is requested.

unmanagedCallConv
CallingConvention

此方法的非托管调用约定。The unmanaged calling convention of the method.

returnType
Type

方法的返回类型,对于 void 返回类型为 null(在 Visual Basic 中为 Sub 过程)。The return type of the method, or null for a void return type (Sub procedure in Visual Basic).

返回

SignatureHelper

方法的 SignatureHelper 对象。The SignatureHelper object for a method.

例外

modnullmod is null.

mod 不是 ModuleBuildermod is not a ModuleBuilder.

- 或 --or- unmanagedCallConv 是未知的非托管调用约定。unmanagedCallConv is an unknown unmanaged calling convention.

适用于

GetMethodSigHelper(CallingConvention, Type)

已知方法的非托管调用约定和返回类型,返回方法的签名帮助程序。Returns a signature helper for a method given the method's unmanaged calling convention and return type.

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

此方法的非托管调用约定。The unmanaged calling convention of the method.

returnType
Type

方法的返回类型,对于 void 返回类型为 null(在 Visual Basic 中为 Sub 过程)。The return type of the method, or null for a void return type (Sub procedure in Visual Basic).

返回

SignatureHelper

方法的 SignatureHelper 对象。The SignatureHelper object for a method.

例外

unmanagedCallConv 是未知的非托管调用约定。unmanagedCallConv is an unknown unmanaged calling convention.

适用于

GetMethodSigHelper(CallingConventions, Type)

已知方法的调用约定和返回类型,返回方法的签名帮助程序。Returns a signature helper for a method given the method's calling convention and return type.

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

方法的调用约定。The calling convention of the method.

returnType
Type

方法的返回类型,对于 void 返回类型为 null(在 Visual Basic 中为 Sub 过程)。The return type of the method, or null for a void return type (Sub procedure in Visual Basic).

返回

SignatureHelper

方法的 SignatureHelper 对象。The SignatureHelper object for a method.

适用于

GetMethodSigHelper(Module, CallingConventions, Type)

在给定了方法的模块、调用约定和返回类型的情况下,返回方法的签名帮助程序。Returns a signature helper for a method given the method's module, calling convention, and return type.

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

包含 SignatureHelper 请求的方法的 ModuleBuilderThe ModuleBuilder that contains the method for which the SignatureHelper is requested.

callingConvention
CallingConventions

方法的调用约定。The calling convention of the method.

returnType
Type

方法的返回类型,对于 void 返回类型为 null(在 Visual Basic 中为 Sub 过程)。The return type of the method, or null for a void return type (Sub procedure in Visual Basic).

返回

SignatureHelper

方法的 SignatureHelper 对象。The SignatureHelper object for a method.

例外

modnullmod is null.

mod 不是 ModuleBuildermod is not a ModuleBuilder.

适用于