SignatureHelper SignatureHelper SignatureHelper SignatureHelper Class

定义

提供生成签名的方法。Provides methods for building signatures.

public ref class SignatureHelper sealed : System::Runtime::InteropServices::_SignatureHelper
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class SignatureHelper : System.Runtime.InteropServices._SignatureHelper
type SignatureHelper = class
    interface _SignatureHelper
Public NotInheritable Class SignatureHelper
Implements _SignatureHelper
继承
SignatureHelperSignatureHelperSignatureHelperSignatureHelper
属性
实现

注解

使用类创建可传递SetLocalSignatureDynamicILInfo类的方法的签名 blob。 SignatureHelperUse the SignatureHelper class to create a signature blob that can be passed to the SetLocalSignature method of the DynamicILInfo class. 还可以将ILGenerator.Emit(OpCode, SignatureHelper)对象传递给方法重载, 以将指令和签名标记插入 Microsoft 中间语言 (MSIL) 流中。 SignatureHelperA SignatureHelper object can also be passed to the ILGenerator.Emit(OpCode, SignatureHelper) method overload to insert an instruction and a signature token into a Microsoft intermediate language (MSIL) stream. 有关签名 blob 和签名元数据的信息, 请参阅 ECMA Partition II 元数据文档。For information on signature blobs and signature metadata, see the ECMA Partition II Metadata documentation.

备注

ECMA Partition II 文档在线提供;请参阅 MSDN 上的ECMA C#和公共语言基础结构标准, 以及 Ecma International 网站上的标准 Ecma-335-公共语言基础结构 (CLI)The ECMA Partition II documentation is available online; see ECMA C# and Common Language Infrastructure Standards on MSDN and Standard ECMA-335 - Common Language Infrastructure (CLI) on the Ecma International Web site.

方法

AddArgument(Type) AddArgument(Type) AddArgument(Type) AddArgument(Type)

为签名添加参数。Adds an argument to the signature.

AddArgument(Type, Boolean) AddArgument(Type, Boolean) AddArgument(Type, Boolean) AddArgument(Type, Boolean)

向签名添加指定类型的参数,指定该参数是否固定。Adds an argument of the specified type to the signature, specifying whether the argument is pinned.

AddArgument(Type, Type[], Type[]) AddArgument(Type, Type[], Type[]) AddArgument(Type, Type[], Type[]) AddArgument(Type, Type[], Type[])

向签名添加具有指定自定义修饰符的参数。Adds an argument to the signature, with the specified custom modifiers.

AddArguments(Type[], Type[][], Type[][]) AddArguments(Type[], Type[][], Type[][]) AddArguments(Type[], Type[][], Type[][]) AddArguments(Type[], Type[][], Type[][])

向签名添加具有指定自定义修饰符的一组参数。Adds a set of arguments to the signature, with the specified custom modifiers.

AddSentinel() AddSentinel() AddSentinel() AddSentinel()

标记 vararg 固定部分的结尾。Marks the end of a vararg fixed part. 这仅在调用方创建 vararg 签名调用站点时使用。This is only used if the caller is creating a vararg signature call site.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

检查该实例是否等于给定对象。Checks if this instance is equal to the given object.

GetFieldSigHelper(Module) GetFieldSigHelper(Module) GetFieldSigHelper(Module) GetFieldSigHelper(Module)

返回字段的签名帮助程序。Returns a signature helper for a field.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

创建并返回此实例的哈希代码。Creates and returns a hash code for this instance.

GetLocalVarSigHelper() GetLocalVarSigHelper() GetLocalVarSigHelper() GetLocalVarSigHelper()

返回局部变量的签名帮助程序。Returns a signature helper for a local variable.

GetLocalVarSigHelper(Module) GetLocalVarSigHelper(Module) GetLocalVarSigHelper(Module) GetLocalVarSigHelper(Module)

返回局部变量的签名帮助程序。Returns a signature helper for a local variable.

GetMethodSigHelper(CallingConvention, Type) GetMethodSigHelper(CallingConvention, Type) GetMethodSigHelper(CallingConvention, Type) GetMethodSigHelper(CallingConvention, Type)

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

GetMethodSigHelper(CallingConventions, Type) GetMethodSigHelper(CallingConventions, Type) GetMethodSigHelper(CallingConventions, Type) GetMethodSigHelper(CallingConventions, Type)

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

GetMethodSigHelper(Module, CallingConvention, Type) GetMethodSigHelper(Module, CallingConvention, Type) GetMethodSigHelper(Module, CallingConvention, Type) GetMethodSigHelper(Module, CallingConvention, Type)

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

GetMethodSigHelper(Module, CallingConventions, Type) GetMethodSigHelper(Module, CallingConventions, Type) GetMethodSigHelper(Module, CallingConventions, 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[]) GetMethodSigHelper(Module, Type, Type[]) GetMethodSigHelper(Module, Type, 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.

GetPropertySigHelper(Module, CallingConventions, Type, Type[], Type[], Type[], Type[][], Type[][]) GetPropertySigHelper(Module, CallingConventions, Type, Type[], Type[], Type[], Type[][], Type[][]) GetPropertySigHelper(Module, CallingConventions, Type, Type[], Type[], Type[], Type[][], Type[][]) GetPropertySigHelper(Module, CallingConventions, Type, Type[], Type[], Type[], Type[][], Type[][])

已知包含属性、调用约定、属性类型、属性参数以及返回类型和参数的自定义修饰符的动态模块,返回属性的签名帮助程序。Returns a signature helper for a property, given the dynamic module that contains the property, the calling convention, the property type, the property arguments, and custom modifiers for the return type and arguments.

GetPropertySigHelper(Module, Type, Type[]) GetPropertySigHelper(Module, Type, Type[]) GetPropertySigHelper(Module, Type, Type[]) GetPropertySigHelper(Module, Type, Type[])

已知包含属性、属性类型和属性参数的动态模块,返回属性的签名帮助程序。Returns a signature helper for a property, given the dynamic module that contains the property, the property type, and the property arguments.

GetPropertySigHelper(Module, Type, Type[], Type[], Type[], Type[][], Type[][]) GetPropertySigHelper(Module, Type, Type[], Type[], Type[], Type[][], Type[][]) GetPropertySigHelper(Module, Type, Type[], Type[], Type[], Type[][], Type[][]) GetPropertySigHelper(Module, Type, Type[], Type[], Type[], Type[][], Type[][])

已知包含属性、属性类型、属性参数以及返回类型和参数的自定义修饰符的动态模块,返回属性的签名帮助程序。Returns a signature helper for a property, given the dynamic module that contains the property, the property type, the property arguments, and custom modifiers for the return type and arguments.

GetSignature() GetSignature() GetSignature() GetSignature()

在签名中添加结束令牌并将签名标记为已完成,以确保不能再添加更多的令牌。Adds the end token to the signature and marks the signature as finished, so no further tokens can be added.

GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

返回表示签名参数的字符串。Returns a string representing the signature arguments.

显式界面实现

_SignatureHelper.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _SignatureHelper.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _SignatureHelper.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) _SignatureHelper.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

将一组名称映射为对应的一组调度标识符。Maps a set of names to a corresponding set of dispatch identifiers.

_SignatureHelper.GetTypeInfo(UInt32, UInt32, IntPtr) _SignatureHelper.GetTypeInfo(UInt32, UInt32, IntPtr) _SignatureHelper.GetTypeInfo(UInt32, UInt32, IntPtr) _SignatureHelper.GetTypeInfo(UInt32, UInt32, IntPtr)

检索对象的类型信息,然后可以使用该信息获取接口的类型信息。Retrieves the type information for an object, which can then be used to get the type information for an interface.

_SignatureHelper.GetTypeInfoCount(UInt32) _SignatureHelper.GetTypeInfoCount(UInt32) _SignatureHelper.GetTypeInfoCount(UInt32) _SignatureHelper.GetTypeInfoCount(UInt32)

检索对象提供的类型信息接口的数量(0 或 1)。Retrieves the number of type information interfaces that an object provides (either 0 or 1).

_SignatureHelper.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _SignatureHelper.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _SignatureHelper.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) _SignatureHelper.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供对某一对象公开的属性和方法的访问。Provides access to properties and methods exposed by an object.

适用于