Class ParameterDescriptor
Contains information that describes a parameter.
public abstract class ParameterDescriptor : ICustomAttributeProvider
- Inheritance
-
ParameterDescriptor
- Implements
- Derived
- Inherited Members
Constructors
ParameterDescriptor()
Initializes a new instance of the ParameterDescriptor class.
protected ParameterDescriptor()
Properties
ActionDescriptor
Gets the action descriptor.
public abstract ActionDescriptor ActionDescriptor { get; }
Property Value
- ActionDescriptor
The action descriptor.
BindingInfo
Gets the binding information.
public virtual ParameterBindingInfo BindingInfo { get; }
Property Value
- ParameterBindingInfo
The binding information.
DefaultValue
Gets the default value of the parameter.
public virtual object DefaultValue { get; }
Property Value
- object
The default value of the parameter.
ParameterName
Gets the name of the parameter.
public abstract string ParameterName { get; }
Property Value
- string
The name of the parameter.
ParameterType
Gets the type of the parameter.
public abstract Type ParameterType { get; }
Property Value
- Type
The type of the parameter.
Methods
GetCustomAttributes(bool)
Returns an array of custom attributes that are defined for this member, excluding named attributes.
public virtual object[] GetCustomAttributes(bool inherit)
Parameters
inherit
booltrue to look up the hierarchy chain for the inherited custom attribute; otherwise, false.
Returns
- object[]
An array of custom attributes, or an empty array if no custom attributes exist.
Exceptions
- TypeLoadException
The custom attribute type cannot be loaded.
- AmbiguousMatchException
There is more than one attribute of type
attributeType
defined for this member.
GetCustomAttributes(Type, bool)
Returns an array of custom attributes that are defined for this member, identified by type.
public virtual object[] GetCustomAttributes(Type attributeType, bool inherit)
Parameters
attributeType
TypeThe type of the custom attributes.
inherit
booltrue to look up the hierarchy chain for the inherited custom attribute; otherwise, false.
Returns
- object[]
An array of custom attributes, or an empty array if no custom attributes exist.
Exceptions
- TypeLoadException
The custom attribute type cannot be loaded.
- AmbiguousMatchException
There is more than one attribute of type
attributeType
defined for this member.- ArgumentNullException
The
attributeType
parameter is null.
IsDefined(Type, bool)
Indicates whether one or more instances of a custom attribute type are defined for this member.
public virtual bool IsDefined(Type attributeType, bool inherit)
Parameters
attributeType
TypeThe type of the custom attributes.
inherit
booltrue to look up the hierarchy chain for the inherited custom attribute; otherwise, false.
Returns
- bool
true if the custom attribute type is defined for this member; otherwise, false.
Exceptions
- ArgumentNullException
The
attributeType
parameter is null.