Interface IParameterInfoIntrospectionProvider
Interface representing a reflection provider used to introspect System.Reflection.ParameterInfo objects.
Namespace: System.Reflection
Assembly: Nuqleon.Reflection.Virtualization.dll
Syntax
public interface IParameterInfoIntrospectionProvider
Methods
GetAttributes(ParameterInfo)
Gets the attributes for the specified parameter.
Declaration
ParameterAttributes GetAttributes(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the attributes for. |
Returns
Type | Description |
---|---|
System.Reflection.ParameterAttributes | A System.Reflection.ParameterAttributes object representing the attributes for this parameter. |
GetCustomAttributes(ParameterInfo, Boolean)
Returns an array of all custom attributes applied to the specified parameter.
Declaration
IReadOnlyList<object> GetCustomAttributes(ParameterInfo parameter, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the custom attributes for. |
System.Boolean | inherit | true to search the specified parameter's inheritance chain to find the attributes; otherwise, false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains all the custom attributes applied to the specified parameter, or an array with zero elements if no attributes are defined. |
GetCustomAttributes(ParameterInfo, Type, Boolean)
Returns an array of custom attributes applied to the specified parameter and identified by the specified attributeType
.
Declaration
IReadOnlyList<object> GetCustomAttributes(ParameterInfo parameter, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the custom attributes for. |
System.Type | attributeType | The type of attribute to search for. Only attributes that are assignable to this type are returned. |
System.Boolean | inherit | true to search the specified parameter's inheritance chain to find the attributes; otherwise, false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array of custom attributes applied to the specified parameter, or an array with zero elements if no attributes assignable to |
GetCustomAttributesData(ParameterInfo)
Gets the custom attributes data defined on the specified parameter.
Declaration
IEnumerable<CustomAttributeData> GetCustomAttributesData(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The member to get the custom attributes data for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> | The custom attributes data for the specified parameter. |
GetMember(ParameterInfo)
Gets a value indicating the member in which the parameter is implemented.
Declaration
MemberInfo GetMember(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the member for. |
Returns
Type | Description |
---|---|
System.Reflection.MemberInfo | The member which implanted the parameter represented by |
GetMetadataToken(ParameterInfo)
Gets a value that identifies this parameter in metadata.
Declaration
int GetMetadataToken(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the metadata token for. |
Returns
Type | Description |
---|---|
System.Int32 | A value which, in combination with the module, uniquely identifies this parameter in metadata. |
GetName(ParameterInfo)
Gets the name of the specified parameter.
Declaration
string GetName(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the name for. |
Returns
Type | Description |
---|---|
System.String | The name of the specified parameter. |
GetOptionalCustomModifiers(ParameterInfo)
Returns an array of types representing the optional custom modifiers of the parameter.
Declaration
IReadOnlyList<Type> GetOptionalCustomModifiers(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the modifiers for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that identify the optional custom modifiers of the specified |
GetParameterType(ParameterInfo)
Gets the type of the specified parameter.
Declaration
Type GetParameterType(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the type for. |
Returns
Type | Description |
---|---|
System.Type | The type of the specified parameter. |
GetPosition(ParameterInfo)
Gets the zero-based position of the parameter in the formal parameter list.
Declaration
int GetPosition(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the position for. |
Returns
Type | Description |
---|---|
System.Int32 | An integer representing the position the specified parameter occupies in the parameter list. |
GetRequiredCustomModifiers(ParameterInfo)
Returns an array of types representing the required custom modifiers of the parameter.
Declaration
IReadOnlyList<Type> GetRequiredCustomModifiers(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to get the modifiers for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that identify the required custom modifiers of the specified |
HasDefaultValue(ParameterInfo)
Gets a value indicating whether the specified parameter has a default value.
Declaration
bool HasDefaultValue(ParameterInfo parameter)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to check for a default value. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified parameter has a default value; otherwise, false. |
IsDefined(ParameterInfo, Type, Boolean)
Determines whether the custom attribute of the specified attributeType
type or its derived types is applied to the specified parameter
.
Declaration
bool IsDefined(ParameterInfo parameter, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.ParameterInfo | parameter | The parameter to check the custom attribute on. |
System.Type | attributeType | The type of attribute to search for. |
System.Boolean | inherit | This argument is ignored for objects of this type. |
Returns
Type | Description |
---|---|
System.Boolean | true if one or more instances of |