Class ReflectedParameterDescriptor
Contains information that describes a reflected action-method parameter.
public class ReflectedParameterDescriptor : ParameterDescriptor, ICustomAttributeProvider
- Inheritance
-
ReflectedParameterDescriptor
- Implements
- Inherited Members
Constructors
ReflectedParameterDescriptor(ParameterInfo, ActionDescriptor)
Initializes a new instance of the ReflectedParameterDescriptor class.
public ReflectedParameterDescriptor(ParameterInfo parameterInfo, ActionDescriptor actionDescriptor)
Parameters
parameterInfoParameterInfoThe parameter information.
actionDescriptorActionDescriptorThe action descriptor.
Exceptions
- ArgumentNullException
The
parameterInfooractionDescriptorparameter is null.
Properties
ActionDescriptor
Gets the action descriptor.
public override ActionDescriptor ActionDescriptor { get; }
Property Value
- ActionDescriptor
The action descriptor.
BindingInfo
Gets the binding information.
public override ParameterBindingInfo BindingInfo { get; }
Property Value
- ParameterBindingInfo
The binding information.
DefaultValue
Gets the default value of the reflected parameter.
public override object DefaultValue { get; }
Property Value
- object
The default value of the reflected parameter.
ParameterInfo
Gets or sets the parameter information.
public ParameterInfo ParameterInfo { get; }
Property Value
- ParameterInfo
The parameter information.
ParameterName
Gets the name of the parameter.
public override string ParameterName { get; }
Property Value
- string
The name of the parameter.
ParameterType
Gets the type of the parameter.
public override 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 override object[] GetCustomAttributes(bool inherit)
Parameters
inheritbooltrue 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
attributeTypedefined for this member.
GetCustomAttributes(Type, bool)
Returns an array of custom attributes that are defined for this member, identified by type.
public override object[] GetCustomAttributes(Type attributeType, bool inherit)
Parameters
attributeTypeTypeThe type of the custom attributes.
inheritbooltrue 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
attributeTypedefined for this member.
IsDefined(Type, bool)
Returns a value that indicates whether one or more instances of a custom attribute type are defined for this member.
public override bool IsDefined(Type attributeType, bool inherit)
Parameters
attributeTypeTypeThe type of the custom attributes.
inheritbooltrue 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.