Class CachingDefaultReflectionProvider
Reflection provider which caches the results of pure reflection functions.
Inheritance
Implements
Inherited Members
Namespace: System.Reflection
Assembly: Nuqleon.Reflection.Virtualization.dll
Syntax
public class CachingDefaultReflectionProvider : DefaultReflectionProvider, IReflectionProvider, IReflectionIntrospectionProvider, IAssemblyIntrospectionProvider, IModuleIntrospectionProvider, ITypeIntrospectionProvider, IReflectionTypeSystemProvider, IFieldInfoIntrospectionProvider, IMethodInfoIntrospectionProvider, IMethodBaseIntrospectionProvider, IPropertyInfoIntrospectionProvider, IEventInfoIntrospectionProvider, IMemberInfoIntrospectionProvider, IParameterInfoIntrospectionProvider, IReflectionCreationProvider, ITypeCreationProvider, IMethodCreationProvider, IReflectionInvocationProvider, IReflectionLoadingProvider, IAssemblyLoadingProvider, IModuleLoadingProvider, ITypeLoadingProvider, IComTypeLoadingProvider, IReflectionHandlerResolver, IClearable
Constructors
CachingDefaultReflectionProvider(IMemoizer)
Creates a new caching reflection provider using the specified memoizer
to create caches.
All reflection methods that are deemed expensive and return objects that can be cached will be subject to caching.
Declaration
public CachingDefaultReflectionProvider(IMemoizer memoizer)
Parameters
Type | Name | Description |
---|---|---|
IMemoizer | memoizer | The memoizer to use for cache creation. |
CachingDefaultReflectionProvider(IMemoizer, ReflectionCachingOptions)
Creates a new caching reflection provider using the specified memoizer
to create caches and using the specified caching options
.
Declaration
public CachingDefaultReflectionProvider(IMemoizer memoizer, ReflectionCachingOptions options)
Parameters
Type | Name | Description |
---|---|---|
IMemoizer | memoizer | The memoizer to use for cache creation. |
ReflectionCachingOptions | options | Options to control which reflection methods get cached. |
Methods
Clear()
Clears all the caches.
Declaration
public void Clear()
FindInterfaces(Type, TypeFilter, Object)
Returns an array of System.Type objects representing a filtered list of interfaces implemented or inherited by the specified type
.
Declaration
public override IReadOnlyList<Type> FindInterfaces(Type type, TypeFilter filter, object filterCriteria)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to find interfaces for. |
System.Reflection.TypeFilter | filter | The delegate that compares the interfaces against |
System.Object | filterCriteria | The search criteria that determines whether an interface should be included in the returned array. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects representing a filtered list of the interfaces implemented or inherited by the specified |
Overrides
FindMembers(Type, MemberTypes, BindingFlags, MemberFilter, Object)
Returns a filtered array of System.Reflection.MemberInfo objects of the specified member type.
Declaration
public override IReadOnlyList<MemberInfo> FindMembers(Type type, MemberTypes memberType, BindingFlags bindingAttr, MemberFilter filter, object filterCriteria)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to find members in. |
System.Reflection.MemberTypes | memberType | An object that indicates the type of member to search for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted.-or- Zero, to return null. |
System.Reflection.MemberFilter | filter | The delegate that does the comparisons, returning true if the member currently being inspected matches the |
System.Object | filterCriteria | The search criteria that determines whether a member is returned in the array of MemberInfo objects.The fields of FieldAttributes, MethodAttributes, and MethodImplAttributes can be used in conjunction with the FilterAttribute delegate supplied by this class. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | A filtered array of System.Reflection.MemberInfo objects of the specified member type.-or- An empty array of type System.Reflection.MemberInfo, if the specified |
Overrides
FindTypes(Module, TypeFilter, Object)
Returns an array of classes accepted by the given filter and filter criteria.
Declaration
public override IReadOnlyList<Type> FindTypes(Module module, TypeFilter filter, object filterCriteria)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to find types in. |
System.Reflection.TypeFilter | filter | The delegate used to filter the classes. |
System.Object | filterCriteria | An Object used to filter the classes. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of type System.Type containing classes that were accepted by the filter. |
Overrides
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
public override 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 |
Overrides
GetConstructors(Type, BindingFlags)
Searches for the constructors defined for the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<ConstructorInfo> GetConstructors(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the constructors for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.ConstructorInfo> | An array of System.Reflection.ConstructorInfo objects representing all constructors defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.ConstructorInfo, if no constructors are defined for the specified type, or if none of the defined constructors match the binding constraints. |
Overrides
GetCustomAttributes(Assembly, Boolean)
Gets all the custom attributes for the specified assembly
.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(Assembly assembly, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get custom attributes for. |
System.Boolean | inherit | This argument is ignored for objects of type System.Reflection.Assembly. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains the custom attributes for the specified |
Overrides
GetCustomAttributes(Assembly, Type, Boolean)
Gets the custom attributes for the specified assembly
as specified by type.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(Assembly assembly, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get custom attributes for. |
System.Type | attributeType | The type for which the custom attributes are to be returned. |
System.Boolean | inherit | This argument is ignored for objects of type System.Reflection.Assembly. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains the custom attributes for the specified |
Overrides
GetCustomAttributes(MemberInfo, Boolean)
Returns an array of all custom attributes applied to the specified member.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(MemberInfo member, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member to get the custom attributes for. |
System.Boolean | inherit | true to search the specified member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains all the custom attributes applied to the specified member, or an array with zero elements if no attributes are defined. |
Overrides
GetCustomAttributes(MemberInfo, Type, Boolean)
Returns an array of custom attributes applied to the specified member and identified by the specified attributeType
.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(MemberInfo member, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member 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 member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array of custom attributes applied to the specified member, or an array with zero elements if no attributes assignable to |
Overrides
GetCustomAttributes(Module, Boolean)
Gets all the custom attributes for the specified module
.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(Module module, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get custom attributes for. |
System.Boolean | inherit | This argument is ignored for objects of type System.Reflection.Module. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains the custom attributes for the specified |
Overrides
GetCustomAttributes(Module, Type, Boolean)
Gets the custom attributes for the specified module
as specified by type.
Declaration
public override IReadOnlyList<object> GetCustomAttributes(Module module, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get custom attributes for. |
System.Type | attributeType | The type for which the custom attributes are to be returned. |
System.Boolean | inherit | This argument is ignored for objects of type System.Reflection.Module. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Object> | An array that contains the custom attributes for the specified |
Overrides
GetCustomAttributes(ParameterInfo, Boolean)
Returns an array of all custom attributes applied to the specified parameter.
Declaration
public override 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. |
Overrides
GetCustomAttributes(ParameterInfo, Type, Boolean)
Returns an array of custom attributes applied to the specified parameter and identified by the specified attributeType
.
Declaration
public override 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 |
Overrides
GetCustomAttributesData(Assembly)
Returns information about the attributes that have been applied to the specified assembly
, expressed as System.Reflection.CustomAttributeData objects.
Declaration
public override IEnumerable<CustomAttributeData> GetCustomAttributesData(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get custom attributes data for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> | A generic list of System.Reflection.CustomAttributeData objects representing data about the attributes that have been applied to the specified |
Overrides
GetCustomAttributesData(MemberInfo)
Gets the custom attributes data defined on the specified member.
Declaration
public override IEnumerable<CustomAttributeData> GetCustomAttributesData(MemberInfo member)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | 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 member. |
Overrides
GetCustomAttributesData(Module)
Returns information about the attributes that have been applied to the specified module
, expressed as System.Reflection.CustomAttributeData objects.
Declaration
public override IEnumerable<CustomAttributeData> GetCustomAttributesData(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to get custom attributes data for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData> | A generic list of System.Reflection.CustomAttributeData objects representing data about the attributes that have been applied to the specified |
Overrides
GetCustomAttributesData(ParameterInfo)
Gets the custom attributes data defined on the specified parameter.
Declaration
public override 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. |
Overrides
GetDefaultMembers(Type)
Searches for the members defined for the specified type
whose System.Reflection.DefaultMemberAttribute is set.
Declaration
public override IReadOnlyList<MemberInfo> GetDefaultMembers(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the default members for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | An array of System.Reflection.MemberInfo objects representing all default members of the specified |
Overrides
GetDefinedTypes(Assembly)
Gets the types defined in the specified assembly
.
Declaration
public override IEnumerable<TypeInfo> GetDefinedTypes(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to search in. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.Reflection.TypeInfo> | An array of types defined in the specified |
Overrides
GetEvents(Type, BindingFlags)
Searches for events that are declared or inherited by the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<EventInfo> GetEvents(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the events for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.EventInfo> | An array of System.Reflection.EventInfo objects representing all events defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.EventInfo, if no events are defined for the specified type, or if none of the defined events match the binding constraints. |
Overrides
GetExportedTypes(Assembly)
Gets the public types defined in the specified assembly
that are visible outside the specified assembly
.
Declaration
public override IReadOnlyList<Type> GetExportedTypes(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get exported types from. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array that represents the types defined in this assembly that are visible outside the assembly. |
Overrides
GetFields(Module, BindingFlags)
Returns the global fields defined on the module that match the specified binding flags.
Declaration
public override IReadOnlyList<FieldInfo> GetFields(Module module, BindingFlags bindingFlags)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to search in. |
System.Reflection.BindingFlags | bindingFlags | A bitwise combination of System.Reflection.BindingFlags values that limit the search. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.FieldInfo> | An array of type System.Reflection.FieldInfo representing the global fields defined on the module that match the specified binding flags; if no global fields match the binding flags, an empty array is returned. |
Overrides
GetFields(Type, BindingFlags)
Searches for fields defined for the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<FieldInfo> GetFields(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the fields for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.FieldInfo> | An array of System.Reflection.FieldInfo objects representing all fields defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.FieldInfo, if no fields are defined for the specified type, or if none of the defined fields match the binding constraints. |
Overrides
GetGenericArguments(MethodInfo)
Returns an array of System.Type objects that represent the type arguments of a closed generic method or the type parameters of a generic method definition.
Declaration
public override IReadOnlyList<Type> GetGenericArguments(MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method to get the generic arguments for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that represent the type arguments of a generic method. Returns an empty array if the specified method is not a generic method. |
Overrides
GetGenericArguments(Type)
Returns an array of System.Type objects that represent the type arguments of a closed generic type or the type parameters of a generic type definition.
Declaration
public override IReadOnlyList<Type> GetGenericArguments(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the generic arguments for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that represent the type arguments of a generic type. Returns an empty array if the specified type is not a generic type. |
Overrides
GetGenericParameterConstraints(Type)
Returns an array of System.Type objects that represent the constraints on the generic type parameter.
Declaration
public override IReadOnlyList<Type> GetGenericParameterConstraints(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The generic parameter type to get the constraints for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects that represent the constraints on the specified generic type parameter. |
Overrides
GetIndexParameters(PropertyInfo)
Returns an array of all the index parameters for the property.
Declaration
public override 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. |
Overrides
GetInterfaces(Type)
Gets all the interfaces implemented or inherited by the specified type.
Declaration
public override IReadOnlyList<Type> GetInterfaces(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the interfaces for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects representing all the interfaces implemented or inherited by the specified type.-or- An empty array of type System.Type, if no interfaces are implemented or inherited by the specified type. |
Overrides
GetMembers(Type, BindingFlags)
Searches for members defined for the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<MemberInfo> GetMembers(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the members for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MemberInfo> | An array of System.Reflection.MemberInfo objects representing all members defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.MemberInfo, if no members are defined for the specified type, or if none of the defined members match the binding constraints. |
Overrides
GetMethods(Module, BindingFlags)
Returns the global methods defined on the module that match the specified binding flags.
Declaration
public override IReadOnlyList<MethodInfo> GetMethods(Module module, BindingFlags bindingFlags)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to search in. |
System.Reflection.BindingFlags | bindingFlags | A bitwise combination of System.Reflection.BindingFlags values that limit the search. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MethodInfo> | An array of type System.Reflection.MethodInfo representing the global methods defined on the module that match the specified binding flags; if no global methods match the binding flags, an empty array is returned. |
Overrides
GetMethods(Type, BindingFlags)
Searches for methods defined for the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<MethodInfo> GetMethods(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the methods for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.MethodInfo> | An array of System.Reflection.MethodInfo objects representing all methods defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.MethodInfo, if no methods are defined for the specified type, or if none of the defined methods match the binding constraints. |
Overrides
GetModules(Assembly, Boolean)
Gets all the modules that are part of the specified assembly
, specifying whether to include resource modules.
Declaration
public override IReadOnlyList<Module> GetModules(Assembly assembly, bool getResourceModules)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the modules for. |
System.Boolean | getResourceModules | true to include resource modules; otherwise, false. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.Module> | An array of modules. |
Overrides
GetNestedTypes(Type, BindingFlags)
Searches for types nested in the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<Type> GetNestedTypes(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the nested types for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of System.Type objects representing all nested types defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Type, if no nested types are defined for the specified type, or if none of the nested types methods match the binding constraints. |
Overrides
GetOptionalCustomModifiers(FieldInfo)
Returns an array of types representing the optional custom modifiers of the field.
Declaration
public override IReadOnlyList<Type> GetOptionalCustomModifiers(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field 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 |
Overrides
GetOptionalCustomModifiers(ParameterInfo)
Returns an array of types representing the optional custom modifiers of the parameter.
Declaration
public override 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 |
Overrides
GetOptionalCustomModifiers(PropertyInfo)
Returns an array of types representing the optional custom modifiers of the property.
Declaration
public override 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 |
Overrides
GetOtherMethods(EventInfo, Boolean)
Returns the public methods that have been associated with an event in metadata using the .other directive.
Declaration
public override IReadOnlyList<MethodInfo> GetOtherMethods(EventInfo event, bool nonPublic)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.EventInfo | event | The event to get the associated methods 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 representing the public methods that have been associated with the event in metadata by using the .other directive. If there are no such public methods, an empty array is returned. |
Overrides
GetParameters(MethodBase)
Gets the parameters of the specified method or constructor.
Declaration
public override IReadOnlyList<ParameterInfo> GetParameters(MethodBase method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodBase | method | The method or constructor to get the parameters for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.ParameterInfo> | An array of type System.Reflection.ParameterInfo containing information that matches the signature of the method (or constructor) of the specified System.Reflection.MethodBase instance. |
Overrides
GetProperties(Type, BindingFlags)
Searches for properties of for the specified type, using the specified binding constraints.
Declaration
public override IReadOnlyList<PropertyInfo> GetProperties(Type type, BindingFlags bindingAttr)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type to get the properties for. |
System.Reflection.BindingFlags | bindingAttr | A bitmask comprised of one or more System.Reflection.BindingFlags that specify how the search is conducted. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.PropertyInfo> | An array of System.Reflection.PropertyInfo objects representing all properties defined for the specified type that match the specified binding constraints.-or- An empty array of type System.Reflection.PropertyInfo, if no properties are defined for the specified type, or if none of the defined properties match the binding constraints. |
Overrides
GetReferencedAssemblies(Assembly)
Gets the System.Reflection.AssemblyName objects for all the assemblies referenced by the specified assembly
.
Declaration
public override IReadOnlyList<AssemblyName> GetReferencedAssemblies(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to get the referenced assemblies for. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Reflection.AssemblyName> | An array that contains the fully parsed display names of all the assemblies referenced by the specified |
Overrides
GetRequiredCustomModifiers(FieldInfo)
Returns an array of types representing the required custom modifiers of the field.
Declaration
public override IReadOnlyList<Type> GetRequiredCustomModifiers(FieldInfo field)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.FieldInfo | field | The field 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 |
Overrides
GetRequiredCustomModifiers(ParameterInfo)
Returns an array of types representing the required custom modifiers of the parameter.
Declaration
public override 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 |
Overrides
GetRequiredCustomModifiers(PropertyInfo)
Returns an array of types representing the required custom modifiers of the property.
Declaration
public override 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 |
Overrides
GetReturnTypeCustomAttributes(MethodInfo)
Gets the custom attributes for the return type of the specified method
.
Declaration
public override ICustomAttributeProvider GetReturnTypeCustomAttributes(MethodInfo method)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | method | The method to get the custom attributes for the return type for. |
Returns
Type | Description |
---|---|
System.Reflection.ICustomAttributeProvider | An System.Reflection.ICustomAttributeProvider object representing the custom attributes for the return type. |
Overrides
GetTypes(Assembly)
Gets the types defined in the specified assembly
.
Declaration
public override IReadOnlyList<Type> GetTypes(Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly to retrieve the types from. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array that contains all the types that are defined in this assembly. |
Overrides
GetTypes(Module)
Returns all the types defined within the specified module
.
Declaration
public override IReadOnlyList<Type> GetTypes(Module module)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module to search in. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyList<System.Type> | An array of type System.Type containing types defined within the module that is reflected by this instance. |
Overrides
IsDefined(Assembly, Type, Boolean)
Determines whether the custom attribute of the specified attributeType
type or its derived types is applied to the specified assembly
.
Declaration
public override bool IsDefined(Assembly assembly, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Assembly | assembly | The assembly 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 |
Overrides
IsDefined(MemberInfo, Type, Boolean)
Determines whether the custom attribute of the specified attributeType
type or its derived types is applied to the specified member
.
Declaration
public override bool IsDefined(MemberInfo member, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | member | The member 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 |
Overrides
IsDefined(Module, Type, Boolean)
Determines whether the custom attribute of the specified attributeType
type or its derived types is applied to the specified module
.
Declaration
public override bool IsDefined(Module module, Type attributeType, bool inherit)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.Module | module | The module 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 |
Overrides
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
public override 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 |
Overrides
MakeGenericMethod(MethodInfo, Type[])
Makes a generic method with the specified generic method definition and type arguments.
Declaration
public override MethodInfo MakeGenericMethod(MethodInfo genericMethodDefinition, params Type[] typeArguments)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | genericMethodDefinition | The generic method definition. |
System.Type[] | typeArguments | The type arguments. |
Returns
Type | Description |
---|---|
System.Reflection.MethodInfo | A generic method with the specified generic method definition and type arguments. |
Overrides
MakeGenericType(Type, Type[])
Makes a generic type with the specified generic type definition and type arguments.
Declaration
public override Type MakeGenericType(Type genericTypeDefinition, params Type[] typeArguments)
Parameters
Type | Name | Description |
---|---|---|
System.Type | genericTypeDefinition | The generic type definition. |
System.Type[] | typeArguments | The type arguments. |
Returns
Type | Description |
---|---|
System.Type | A generic type with the specified generic type definition and type arguments. |