Compartir a través de


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

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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)

Syntax

'Declaration
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
public static SignatureHelper GetPropertySigHelper(
    Module mod,
    Type returnType,
    Type[] requiredReturnTypeCustomModifiers,
    Type[] optionalReturnTypeCustomModifiers,
    Type[] parameterTypes,
    Type[][] requiredParameterTypeCustomModifiers,
    Type[][] optionalParameterTypeCustomModifiers
)

Parameters

  • requiredReturnTypeCustomModifiers
    Type: array<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 nulla null reference (Nothing in Visual Basic).
  • optionalReturnTypeCustomModifiers
    Type: array<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 nulla null reference (Nothing in Visual Basic).
  • parameterTypes
    Type: array<System.Type[]
    The types of the property's arguments, or nulla null reference (Nothing in Visual Basic) if the property has no arguments.
  • requiredParameterTypeCustomModifiers
    Type: array<array<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 nulla 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 nulla null reference (Nothing in Visual Basic) instead of an array of arrays.
  • optionalParameterTypeCustomModifiers
    Type: array<array<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 nulla 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 nulla null reference (Nothing in Visual Basic) instead of an array of arrays.

Return Value

Type: System.Reflection.Emit.SignatureHelper
A SignatureHelper object for a property.

Exceptions

Exception Condition
ArgumentNullException

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

-or-

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

-or-

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

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, array<Type[]) method overload.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.