Show / Hide Table of Contents

Interface IPropertyInfoIntrospectionProvider

Interface representing a reflection provider used to introspect System.Reflection.PropertyInfo objects.

Inherited Members
IMemberInfoIntrospectionProvider.GetCustomAttributesData(MemberInfo)
IMemberInfoIntrospectionProvider.GetCustomAttributes(MemberInfo, Boolean)
IMemberInfoIntrospectionProvider.GetCustomAttributes(MemberInfo, Type, Boolean)
IMemberInfoIntrospectionProvider.GetDeclaringType(MemberInfo)
IMemberInfoIntrospectionProvider.GetMetadataToken(MemberInfo)
IMemberInfoIntrospectionProvider.GetModule(MemberInfo)
IMemberInfoIntrospectionProvider.GetName(MemberInfo)
IMemberInfoIntrospectionProvider.GetReflectedType(MemberInfo)
IMemberInfoIntrospectionProvider.IsDefined(MemberInfo, Type, Boolean)
Namespace: System.Reflection
Assembly: Nuqleon.Reflection.Virtualization.dll
Syntax
public interface IPropertyInfoIntrospectionProvider : IMemberInfoIntrospectionProvider

Methods

CanRead(PropertyInfo)

Gets a value indicating whether the property can be read.

Declaration
bool CanRead(PropertyInfo property)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The property to check for readability.

Returns
Type Description
System.Boolean

true if this property can be read; otherwise, false.

CanWrite(PropertyInfo)

Gets a value indicating whether the property can be written.

Declaration
bool CanWrite(PropertyInfo property)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The property to check for writeable.

Returns
Type Description
System.Boolean

true if this property can be written; otherwise, false.

GetAccessors(PropertyInfo, Boolean)

Returns an array whose elements reflect the public and, if specified, non-public get, set, and other accessors of the specified property.

Declaration
IReadOnlyList<MethodInfo> GetAccessors(PropertyInfo property, bool nonPublic)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The property to get the accessors for.

System.Boolean nonPublic

true if non-public methods can be returned; otherwise, false.

Returns
Type Description
System.Collections.Generic.IReadOnlyList<System.Reflection.MethodInfo>

An array of System.Reflection.MethodInfo objects whose elements reflect the get, set, and other accessors of the specified property. If nonPublic is true, this array contains public and non-public get, set, and other accessors. If nonPublic is false, this array contains only public get, set, and other accessors. If no accessors with the specified visibility are found, this method returns an array with zero (0) elements.

GetAttributes(PropertyInfo)

Gets the attributes associated with the specified property.

Declaration
PropertyAttributes GetAttributes(PropertyInfo property)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The property to get the attributes for.

Returns
Type Description
System.Reflection.PropertyAttributes

The attributes associated with the specified property.

GetGetMethod(PropertyInfo, Boolean)

Returns the public or non-public get accessor for this property.

Declaration
MethodInfo GetGetMethod(PropertyInfo property, bool nonPublic)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The property to get the get accessor for.

System.Boolean nonPublic

true if non-public methods can be returned; otherwise, false.

Returns
Type Description
System.Reflection.MethodInfo

A System.Reflection.MethodInfo object representing the get accessor for this property, if nonPublic is true. Returns null if nonPublic is false and the get accessor is non-public, or if nonPublic is true but no get accessors exist.

GetIndexParameters(PropertyInfo)

Returns an array of all the index parameters for the property.

Declaration
IReadOnlyList<ParameterInfo> GetIndexParameters(PropertyInfo property)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The property to get the index parameters for.

Returns
Type Description
System.Collections.Generic.IReadOnlyList<System.Reflection.ParameterInfo>

An array of type System.Reflection.ParameterInfo containing the parameters for the indexes. If the property is not indexed, the array has 0 (zero) elements.

GetOptionalCustomModifiers(PropertyInfo)

Returns an array of types representing the optional custom modifiers of the property.

Declaration
IReadOnlyList<Type> GetOptionalCustomModifiers(PropertyInfo property)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The property 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 property, such as System.Runtime.CompilerServices.IsConst or System.Runtime.CompilerServices.IsImplicitlyDereferenced.

GetPropertyType(PropertyInfo)

Gets the type of the specified property.

Declaration
Type GetPropertyType(PropertyInfo property)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The property to get the type for.

Returns
Type Description
System.Type

The property type type of the property.

GetRequiredCustomModifiers(PropertyInfo)

Returns an array of types representing the required custom modifiers of the property.

Declaration
IReadOnlyList<Type> GetRequiredCustomModifiers(PropertyInfo property)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The property 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 property, such as System.Runtime.CompilerServices.IsConst or System.Runtime.CompilerServices.IsImplicitlyDereferenced.

GetSetMethod(PropertyInfo, Boolean)

Returns the public or non-public set accessor for this property.

Declaration
MethodInfo GetSetMethod(PropertyInfo property, bool nonPublic)
Parameters
Type Name Description
System.Reflection.PropertyInfo property

The property to get the set accessor for.

System.Boolean nonPublic

true if non-public methods can be returned; otherwise, false.

Returns
Type Description
System.Reflection.MethodInfo

A System.Reflection.MethodInfo object representing the set accessor for this property, if nonPublic is true. Returns null if nonPublic is false and the set accessor is non-public, or if nonPublic is true but no set accessors exist.

Extension Methods

CustomAttributeProviderExtensions.IsDefined(IMemberInfoIntrospectionProvider, MemberInfo, Type)
CustomAttributeProviderExtensions.GetCustomAttributes(IMemberInfoIntrospectionProvider, MemberInfo)
CustomAttributeProviderExtensions.GetCustomAttributes(IMemberInfoIntrospectionProvider, MemberInfo, Type)
CustomAttributeProviderExtensions.GetCustomAttributes(IMemberInfoIntrospectionProvider, MemberInfo, Type, Boolean)
CustomAttributeProviderExtensions.GetCustomAttributes<T>(IMemberInfoIntrospectionProvider, MemberInfo)
CustomAttributeProviderExtensions.GetCustomAttributes(IMemberInfoIntrospectionProvider, MemberInfo, Boolean)
CustomAttributeProviderExtensions.GetCustomAttributes<T>(IMemberInfoIntrospectionProvider, MemberInfo, Boolean)
CustomAttributeProviderExtensions.GetCustomAttribute(IMemberInfoIntrospectionProvider, MemberInfo, Type)
CustomAttributeProviderExtensions.GetCustomAttribute<T>(IMemberInfoIntrospectionProvider, MemberInfo)
CustomAttributeProviderExtensions.GetCustomAttribute(IMemberInfoIntrospectionProvider, MemberInfo, Type, Boolean)
CustomAttributeProviderExtensions.GetCustomAttribute<T>(IMemberInfoIntrospectionProvider, MemberInfo, Boolean)
PropertyInfoIntrospectionProviderExtensions.GetGetMethod(IPropertyInfoIntrospectionProvider, PropertyInfo)
PropertyInfoIntrospectionProviderExtensions.GetSetMethod(IPropertyInfoIntrospectionProvider, PropertyInfo)
PropertyInfoIntrospectionProviderExtensions.GetAccessors(IPropertyInfoIntrospectionProvider, PropertyInfo)
PropertyInfoIntrospectionProviderExtensions.IsSpecialName(IPropertyInfoIntrospectionProvider, PropertyInfo)
In This Article
Back to top Generated by DocFX