Upraviť

Zdieľať cez


SignatureHelper.GetPropertySigHelper Method

Definition

Returns a signature helper for a property.

Overloads

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.

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

Source:
SignatureHelper.cs
Source:
SignatureHelper.cs
Source:
SignatureHelper.cs

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

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

Parameters

mod
Module

The ModuleBuilder that contains the property for which the SignatureHelper is requested.

returnType
Type

The property type.

parameterTypes
Type[]

The argument types, or null if the property has no arguments.

Returns

A SignatureHelper object for a property.

Exceptions

mod is null.

-or-

An element of parameterTypes is null.

Remarks

To create a signature helper for a property with optional or required custom modifiers, use the GetPropertySigHelper(Module, Type, Type[], Type[], Type[], Type[][], Type[][]) method overload.

Applies to

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

Source:
SignatureHelper.cs
Source:
SignatureHelper.cs
Source:
SignatureHelper.cs

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:
 static System::Reflection::Emit::SignatureHelper ^ GetPropertySigHelper(System::Reflection::Module ^ mod, Type ^ returnType, cli::array <Type ^> ^ requiredReturnTypeCustomModifiers, cli::array <Type ^> ^ optionalReturnTypeCustomModifiers, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ requiredParameterTypeCustomModifiers, cli::array <cli::array <Type ^> ^> ^ optionalParameterTypeCustomModifiers);
public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper (System.Reflection.Module? mod, Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers);
public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper (System.Reflection.Module mod, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers);
static member GetPropertySigHelper : System.Reflection.Module * Type * Type[] * Type[] * Type[] * Type[][] * Type[][] -> System.Reflection.Emit.SignatureHelper
Public Shared Function GetPropertySigHelper (mod As Module, returnType As Type, requiredReturnTypeCustomModifiers As Type(), optionalReturnTypeCustomModifiers As Type(), parameterTypes As Type(), requiredParameterTypeCustomModifiers As Type()(), optionalParameterTypeCustomModifiers As Type()()) As SignatureHelper

Parameters

mod
Module

The ModuleBuilder that contains the property for which the SignatureHelper is requested.

returnType
Type

The property type.

requiredReturnTypeCustomModifiers
Type[]

An array of types representing the required custom modifiers for the return type, such as IsConst or IsBoxed. If the return type has no required custom modifiers, specify null.

optionalReturnTypeCustomModifiers
Type[]

An array of types representing the optional custom modifiers for the return type, such as IsConst or IsBoxed. If the return type has no optional custom modifiers, specify null.

parameterTypes
Type[]

The types of the property's arguments, or null if the property has no arguments.

requiredParameterTypeCustomModifiers
Type[][]

An array of arrays of types. Each array of types represents the required custom modifiers for the corresponding argument of the property. If a particular argument has no required custom modifiers, specify null instead of an array of types. If the property has no arguments, or if none of the arguments have required custom modifiers, specify null instead of an array of arrays.

optionalParameterTypeCustomModifiers
Type[][]

An array of arrays of types. Each array of types represents the optional custom modifiers for the corresponding argument of the property. If a particular argument has no optional custom modifiers, specify null instead of an array of types. If the property has no arguments, or if none of the arguments have optional custom modifiers, specify null instead of an array of arrays.

Returns

A SignatureHelper object for a property.

Exceptions

mod is null.

-or-

An element of parameterTypes is null.

-or-

One of the specified custom modifiers is null. (However, null can be specified for the array of custom modifiers for any argument.)

The signature has already been finished.

-or-

mod is not a ModuleBuilder.

-or-

One of the specified custom modifiers is an array type.

-or-

One of the specified custom modifiers is an open generic type. That is, the ContainsGenericParameters property is true for the custom modifier.

-or-

The size of requiredParameterTypeCustomModifiers or optionalParameterTypeCustomModifiers does not equal the size of parameterTypes.

Remarks

See the System.Runtime.CompilerServices namespace for classes that represent custom modifiers.

If a property has no custom modifiers, use the GetPropertySigHelper(Module, Type, Type[]) method overload.

Applies to

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

Source:
SignatureHelper.cs
Source:
SignatureHelper.cs
Source:
SignatureHelper.cs

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 System::Reflection::Emit::SignatureHelper ^ GetPropertySigHelper(System::Reflection::Module ^ mod, System::Reflection::CallingConventions callingConvention, Type ^ returnType, cli::array <Type ^> ^ requiredReturnTypeCustomModifiers, cli::array <Type ^> ^ optionalReturnTypeCustomModifiers, cli::array <Type ^> ^ parameterTypes, cli::array <cli::array <Type ^> ^> ^ requiredParameterTypeCustomModifiers, cli::array <cli::array <Type ^> ^> ^ optionalParameterTypeCustomModifiers);
public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper (System.Reflection.Module? mod, System.Reflection.CallingConventions callingConvention, Type? returnType, Type[]? requiredReturnTypeCustomModifiers, Type[]? optionalReturnTypeCustomModifiers, Type[]? parameterTypes, Type[][]? requiredParameterTypeCustomModifiers, Type[][]? optionalParameterTypeCustomModifiers);
public static System.Reflection.Emit.SignatureHelper GetPropertySigHelper (System.Reflection.Module mod, System.Reflection.CallingConventions callingConvention, Type returnType, Type[] requiredReturnTypeCustomModifiers, Type[] optionalReturnTypeCustomModifiers, Type[] parameterTypes, Type[][] requiredParameterTypeCustomModifiers, Type[][] optionalParameterTypeCustomModifiers);
static member GetPropertySigHelper : System.Reflection.Module * System.Reflection.CallingConventions * Type * Type[] * Type[] * Type[] * Type[][] * Type[][] -> System.Reflection.Emit.SignatureHelper
Public Shared Function GetPropertySigHelper (mod As Module, callingConvention As CallingConventions, returnType As Type, requiredReturnTypeCustomModifiers As Type(), optionalReturnTypeCustomModifiers As Type(), parameterTypes As Type(), requiredParameterTypeCustomModifiers As Type()(), optionalParameterTypeCustomModifiers As Type()()) As SignatureHelper

Parameters

mod
Module

The ModuleBuilder that contains the property for which the SignatureHelper is requested.

callingConvention
CallingConventions

The calling convention of the property accessors.

returnType
Type

The property type.

requiredReturnTypeCustomModifiers
Type[]

An array of types representing the required custom modifiers for the return type, such as IsConst or IsBoxed. If the return type has no required custom modifiers, specify null.

optionalReturnTypeCustomModifiers
Type[]

An array of types representing the optional custom modifiers for the return type, such as IsConst or IsBoxed. If the return type has no optional custom modifiers, specify null.

parameterTypes
Type[]

The types of the property's arguments, or null if the property has no arguments.

requiredParameterTypeCustomModifiers
Type[][]

An array of arrays of types. Each array of types represents the required custom modifiers for the corresponding argument of the property. If a particular argument has no required custom modifiers, specify null instead of an array of types. If the property has no arguments, or if none of the arguments have required custom modifiers, specify null instead of an array of arrays.

optionalParameterTypeCustomModifiers
Type[][]

An array of arrays of types. Each array of types represents the optional custom modifiers for the corresponding argument of the property. If a particular argument has no optional custom modifiers, specify null instead of an array of types. If the property has no arguments, or if none of the arguments have optional custom modifiers, specify null instead of an array of arrays.

Returns

A SignatureHelper object for a property.

Exceptions

mod is null.

-or-

An element of parameterTypes is null.

-or-

One of the specified custom modifiers is null. (However, null can be specified for the array of custom modifiers for any argument.)

The signature has already been finished.

-or-

mod is not a ModuleBuilder.

-or-

One of the specified custom modifiers is an array type.

-or-

One of the specified custom modifiers is an open generic type. That is, the ContainsGenericParameters property is true for the custom modifier.

-or-

The size of requiredParameterTypeCustomModifiers or optionalParameterTypeCustomModifiers does not equal the size of parameterTypes.

Remarks

See the System.Runtime.CompilerServices namespace for classes that represent custom modifiers.

If a property has no custom modifiers, use the GetPropertySigHelper(Module, Type, Type[]) method overload.

Note

This method overload is introduced in the .NET Framework 3.5 or later.

Applies to