Export (0) Print
Expand All

SignatureHelper.GetPropertySigHelper Method (Module, Type, Type[], Type[], Type[], Type[][], Type[][])

Note: This method is new in the .NET Framework version 2.0.

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.

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

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

Parameters

mod

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

returnType

The property type.

requiredReturnTypeCustomModifiers

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 a null reference (Nothing in Visual Basic).

optionalReturnTypeCustomModifiers

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 a null reference (Nothing in Visual Basic).

parameterTypes

The types of the property's arguments, or a null reference (Nothing in Visual Basic) if the property has no arguments.

requiredParameterTypeCustomModifiers

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 a null reference (Nothing in Visual Basic) instead of an array of types. If the property has no arguments, or if none of the arguments have required custom modifiers, specify a null reference (Nothing in Visual Basic) instead of an array of arrays.

optionalParameterTypeCustomModifiers

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 a null reference (Nothing in Visual Basic) instead of an array of types. If the property has no arguments, or if none of the arguments have optional custom modifiers, specify a null reference (Nothing in Visual Basic) instead of an array of arrays.

Return Value

A SignatureHelper object for a property.

Exception typeCondition

ArgumentNullException

mod is a null reference (Nothing in Visual Basic).

-or-

An element of parameterTypes is a null reference (Nothing in Visual Basic).

-or-

One of the specified custom modifiers is a null reference (Nothing in Visual Basic). (However, a null reference (Nothing in Visual Basic) 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.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft