Discovers the attributes of a parameter and provides access to parameter metadata.
More...
|
virtual int | MetadataToken => (this as RuntimeParameterInfo)?.MetadataToken ?? 134217728 |
| Gets a value that identifies this parameter in metadata. More...
|
|
Discovers the attributes of a parameter and provides access to parameter metadata.
Definition at line 14 of file ParameterInfo.cs.
◆ ParameterInfo()
System.Reflection.ParameterInfo.ParameterInfo |
( |
| ) |
|
|
protected |
◆ GetCustomAttributes() [1/2]
virtual object [] System.Reflection.ParameterInfo.GetCustomAttributes |
( |
bool |
inherit | ) |
|
|
virtual |
Gets all the custom attributes defined on this parameter.
- Parameters
-
inherit | This argument is ignored for objects of this type. See Remarks. |
- Returns
- An array that contains all the custom attributes applied to this parameter.
- Exceptions
-
T:System.TypeLoadException | A custom attribute type could not be loaded. |
Implements System.Reflection.ICustomAttributeProvider.
Definition at line 261 of file ParameterInfo.cs.
◆ GetCustomAttributes() [2/2]
virtual object [] System.Reflection.ParameterInfo.GetCustomAttributes |
( |
Type |
attributeType, |
|
|
bool |
inherit |
|
) |
| |
|
virtual |
Gets the custom attributes of the specified type or its derived types that are applied to this parameter.
- Parameters
-
attributeType | The custom attributes identified by type. |
inherit | This argument is ignored for objects of this type. See Remarks. |
- Returns
- An array that contains the custom attributes of the specified type or its derived types.
- Exceptions
-
T:System.ArgumentException | The type must be a type provided by the underlying runtime system. |
T:System.ArgumentNullException | attributeType is null . |
T:System.TypeLoadException | A custom attribute type could not be loaded. |
Implements System.Reflection.ICustomAttributeProvider.
Definition at line 275 of file ParameterInfo.cs.
◆ GetCustomAttributesData()
Returns a list of T:System.Reflection.CustomAttributeData objects for the current parameter, which can be used in the reflection-only context.
- Returns
- A generic list of T:System.Reflection.CustomAttributeData objects representing data about the attributes that have been applied to the current parameter.
Definition at line 305 of file ParameterInfo.cs.
◆ GetOptionalCustomModifiers()
virtual Type [] System.Reflection.ParameterInfo.GetOptionalCustomModifiers |
( |
| ) |
|
|
virtual |
Gets the optional custom modifiers of the parameter.
- Returns
- An array of T:System.Type objects that identify the optional custom modifiers of the current parameter, such as T:System.Runtime.CompilerServices.IsConst or T:System.Runtime.CompilerServices.IsImplicitlyDereferenced.
Definition at line 243 of file ParameterInfo.cs.
◆ GetRealObject()
object System.Reflection.ParameterInfo.GetRealObject |
( |
StreamingContext |
context | ) |
|
Returns the real object that should be deserialized instead of the object that the serialized stream specifies.
- Parameters
-
context | The serialized stream from which the current object is deserialized. |
- Returns
- The actual object that is put into the graph.
- Exceptions
-
T:System.Runtime.Serialization.SerializationException | The parameter's position in the parameter list of its associated member is not valid for that member's type. |
Implements System.Runtime.Serialization.IObjectReference.
Definition at line 360 of file ParameterInfo.cs.
◆ GetRequiredCustomModifiers()
virtual Type [] System.Reflection.ParameterInfo.GetRequiredCustomModifiers |
( |
| ) |
|
|
virtual |
Gets the required custom modifiers of the parameter.
- Returns
- An array of T:System.Type objects that identify the required custom modifiers of the current parameter, such as T:System.Runtime.CompilerServices.IsConst or T:System.Runtime.CompilerServices.IsImplicitlyDereferenced.
Definition at line 236 of file ParameterInfo.cs.
◆ IsDefined()
virtual bool System.Reflection.ParameterInfo.IsDefined |
( |
Type |
attributeType, |
|
|
bool |
inherit |
|
) |
| |
|
virtual |
Determines whether the custom attribute of the specified type or its derived types is applied to this parameter.
- Parameters
-
attributeType | The Type object to search for. |
inherit | This argument is ignored for objects of this type. See Remarks. |
- Returns
true
if one or more instances of attributeType or its derived types are applied to this parameter; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | attributeType is null . |
T:System.ArgumentException | attributeType is not a T:System.Type object supplied by the common language runtime. |
Implements System.Reflection.ICustomAttributeProvider.
Definition at line 294 of file ParameterInfo.cs.
◆ ToString()
override string System.Reflection.ParameterInfo.ToString |
( |
| ) |
|
Gets the parameter type and name represented as a string.
- Returns
- A string containing the type and the name of the parameter.
Definition at line 251 of file ParameterInfo.cs.
◆ AttrsImpl
◆ ClassImpl
Type System.Reflection.ParameterInfo.ClassImpl |
|
protected |
◆ DefaultValueImpl
object System.Reflection.ParameterInfo.DefaultValueImpl |
|
protected |
◆ MemberImpl
MemberInfo System.Reflection.ParameterInfo.MemberImpl |
|
protected |
The member in which the field is implemented.
Definition at line 32 of file ParameterInfo.cs.
◆ MetadataToken
virtual int System.Reflection.ParameterInfo.MetadataToken => (this as RuntimeParameterInfo)?.MetadataToken ?? 134217728 |
Gets a value that identifies this parameter in metadata.
- Returns
- A value which, in combination with the module, uniquely identifies this parameter in metadata.
Definition at line 205 of file ParameterInfo.cs.
◆ NameImpl
string System.Reflection.ParameterInfo.NameImpl |
|
protected |
◆ PositionImpl
int System.Reflection.ParameterInfo.PositionImpl |
|
protected |
The zero-based position of the parameter in the parameter list.
Definition at line 23 of file ParameterInfo.cs.
◆ Attributes
◆ CustomAttributes
Gets a collection that contains this parameter's custom attributes.
- Returns
- A collection that contains this parameter's custom attributes.
Definition at line 211 of file ParameterInfo.cs.
◆ DefaultValue
virtual object System.Reflection.ParameterInfo.DefaultValue |
|
get |
Gets a value indicating the default value if the parameter has a default value.
- Returns
- The default value of the parameter, or F:System.DBNull.Value if the parameter has no default value.
Definition at line 84 of file ParameterInfo.cs.
◆ HasDefaultValue
virtual bool System.Reflection.ParameterInfo.HasDefaultValue |
|
get |
Gets a value that indicates whether this parameter has a default value.
- Returns
true
if this parameter has a default value; otherwise, false
.
Definition at line 72 of file ParameterInfo.cs.
◆ IsIn
bool System.Reflection.ParameterInfo.IsIn |
|
get |
Gets a value indicating whether this is an input parameter.
- Returns
true
if the parameter is an input parameter; otherwise, false
.
Definition at line 143 of file ParameterInfo.cs.
◆ IsLcid
bool System.Reflection.ParameterInfo.IsLcid |
|
get |
Gets a value indicating whether this parameter is a locale identifier (lcid).
- Returns
true
if the parameter is a locale identifier; otherwise, false
.
Definition at line 169 of file ParameterInfo.cs.
◆ IsOptional
bool System.Reflection.ParameterInfo.IsOptional |
|
get |
Gets a value indicating whether this parameter is optional.
- Returns
true
if the parameter is optional; otherwise, false
.
Definition at line 195 of file ParameterInfo.cs.
◆ IsOut
bool System.Reflection.ParameterInfo.IsOut |
|
get |
Gets a value indicating whether this is an output parameter.
- Returns
true
if the parameter is an output parameter; otherwise, false
.
Definition at line 156 of file ParameterInfo.cs.
◆ IsRetval
bool System.Reflection.ParameterInfo.IsRetval |
|
get |
Gets a value indicating whether this is a Retval
parameter.
- Returns
true
if the parameter is a Retval
; otherwise, false
.
Definition at line 182 of file ParameterInfo.cs.
◆ Member
virtual MemberInfo System.Reflection.ParameterInfo.Member |
|
get |
Gets a value indicating the member in which the parameter is implemented.
- Returns
- The member which implanted the parameter represented by this T:System.Reflection.ParameterInfo.
Definition at line 130 of file ParameterInfo.cs.
◆ Name
virtual string System.Reflection.ParameterInfo.Name |
|
get |
Gets the name of the parameter.
- Returns
- The simple name of this parameter.
Definition at line 59 of file ParameterInfo.cs.
◆ ParameterType
virtual Type System.Reflection.ParameterInfo.ParameterType |
|
get |
◆ Position
virtual int System.Reflection.ParameterInfo.Position |
|
get |
Gets the zero-based position of the parameter in the formal parameter list.
- Returns
- An integer representing the position this parameter occupies in the parameter list.
Definition at line 106 of file ParameterInfo.cs.
◆ RawDefaultValue
virtual object System.Reflection.ParameterInfo.RawDefaultValue |
|
get |
Gets a value indicating the default value if the parameter has a default value.
- Returns
- The default value of the parameter, or F:System.DBNull.Value if the parameter has no default value.
Definition at line 95 of file ParameterInfo.cs.
The documentation for this class was generated from the following file: