System.Reflection.Emit.ILGeneration by Microsoft

<PackageReference Include="System.Reflection.Emit.ILGeneration" Version="4.7.0-preview2.19523.17" />

 SignatureHelper

public sealed class SignatureHelper
Provides methods for building signatures.

Returns a signature helper for a field.

Returns a signature helper for a local variable.

Returns a signature helper for a local variable.

public static SignatureHelper GetMethodSigHelper(CallingConventions callingConvention, Type returnType)

Returns a signature helper for a method given the method's calling convention and return type.

public static SignatureHelper GetMethodSigHelper(Module mod, CallingConventions callingConvention, Type returnType)

Returns a signature helper for a method given the method's module, calling convention, and return type.

public static SignatureHelper GetMethodSigHelper(Module mod, Type returnType, Type[] parameterTypes)

Returns a signature helper for a method with a standard calling convention, given the method's module, return type, and argument types.

public static SignatureHelper GetPropertySigHelper(Module mod, CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)

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.

public static SignatureHelper GetPropertySigHelper(Module mod, Type returnType, Type[] parameterTypes)

Returns a signature helper for a property, given the dynamic module that contains the property, the property type, and the property arguments.

public static SignatureHelper GetPropertySigHelper(Module mod, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers)

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.

public void AddArgument(Type clsArgument)

Adds an argument to the signature.

public void AddArgument(Type argument, bool pinned)

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

public void AddArgument(Type argument, Type[] requiredCustomModifiers, Type[] optionalCustomModifiers)

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

public void AddArguments(Type[] arguments, Type[][] requiredCustomModifiers, Type[][] optionalCustomModifiers)

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

public void AddSentinel()

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

public byte[] GetSignature()

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