SignatureHelper.GetPropertySigHelper Method (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.

Namespace:   System.Reflection.Emit
Assembly:  mscorlib (in mscorlib.dll)

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

Parameters

mod
Type: System.Reflection.Module

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

callingConvention
Type: System.Reflection.CallingConventions

The calling convention of the property accessors.

returnType
Type: System.Type

The property type.

requiredReturnTypeCustomModifiers
Type: System.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: System.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: System.Type[]

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

requiredParameterTypeCustomModifiers
Type: System.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: System.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.

Return Value

Type: System.Reflection.Emit.SignatureHelper

A SignatureHelper object for a property.

Exception Condition
ArgumentNullException

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

ArgumentException

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 Type.ContainsGenericParameters property is true for the custom modifier.

-or-

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

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.

System_CAPS_noteNote

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

.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Return to top
Show: