Edit

Share via


SignatureHelper Class

Definition

Provides methods for building signatures.

public ref class SignatureHelper sealed
public ref class SignatureHelper sealed : System::Runtime::InteropServices::_SignatureHelper
public sealed class SignatureHelper
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
public sealed class SignatureHelper : 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
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
type SignatureHelper = class
    interface _SignatureHelper
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type SignatureHelper = class
    interface _SignatureHelper
Public NotInheritable Class SignatureHelper
Public NotInheritable Class SignatureHelper
Implements _SignatureHelper
Inheritance
SignatureHelper
Attributes
Implements

Remarks

Use the SignatureHelper class to create a signature blob that can be passed to the SetLocalSignature method of the DynamicILInfo class. A 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. For information on signature blobs and signature metadata, see the ECMA Partition II Metadata documentation.

For more information, see ECMA 335 Common Language Infrastructure (CLI).

Methods

AddArgument(Type)

Adds an argument to the signature.

AddArgument(Type, Boolean)

Adds an argument of the specified type to the signature, specifying whether the argument is pinned.

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

Adds an argument to the signature, with the specified custom modifiers.

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

Adds a set of arguments to the signature, with the specified custom modifiers.

AddSentinel()

Marks the end of a vararg fixed part. This is only used if the caller is creating a vararg signature call site.

Equals(Object)

Checks if this instance is equal to the given object.

GetFieldSigHelper(Module)

Returns a signature helper for a field.

GetHashCode()

Creates and returns a hash code for this instance.

GetLocalVarSigHelper()

Returns a signature helper for a local variable.

GetLocalVarSigHelper(Module)

Returns a signature helper for a local variable.

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, CallingConvention, Type)

Returns a signature helper for a method given the method's module, unmanaged 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.

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[])

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[][])

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()

Adds the end token to the signature and marks the signature as finished, so no further tokens can be added.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string representing the signature arguments.

Explicit Interface Implementations

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

Maps a set of names to a corresponding set of dispatch identifiers.

_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)

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)

Provides access to properties and methods exposed by an object.

Applies to