This is the online documentation for PostSharp 5.0.
Download PDF or CHM. Go to v4.3 or v5.0

ReflectionSearch Class

Set of static methods providing broader access to assembly metadata than the System.Reflection namespace. These methods are only available at build time.
Inheritance Hierarchy
System.Object
  PostSharp.Reflection.ReflectionSearch

Namespace:  PostSharp.Reflection
Assembly:  PostSharp (in PostSharp.dll) Version: 5.0.33.0 (5.0.33.0)
Syntax
C#
public static class ReflectionSearch

The ReflectionSearch type exposes the following members.

Methods
  NameDescription
Public methodStatic memberGetCustomAttributesOfType(Type)
Gets all custom attributes of a given type in the assembly being currently processed.
Public methodStatic memberGetCustomAttributesOfType(Type, ReflectionSearchOptions)
Gets all custom attributes of a given type in the assembly being currently processed and specifies additional options.
Public methodStatic memberGetCustomAttributesOnTarget(Object)
Gets all custom attributes on a given element of code, including those who have been added indirectly, for instance through MulticastAttribute.
Public methodStatic memberGetCustomAttributesOnTarget(Object, ReflectionSearchOptions)
Gets all custom attributes on a given element of code, including those who have been added indirectly, for instance through MulticastAttribute and specifies additional options.
Public methodStatic memberGetCustomAttributesOnTarget<T>(Object, ReflectionSearchOptions)
Gets all custom attributes of a given type on a given element of code, including those who have been added indirectly, for instance through MulticastAttribute and specifies additional options.
Public methodStatic memberGetDeclarationsUsedByMethod(MethodBase)
Gets all declarations (Type, FieldInfo, MethodInfo or ConstructorInfo) used by the body of a given method or constructor.
Public methodStatic memberGetDeclarationsUsedByMethod(MethodBase, ReflectionSearchOptions)
Gets all declarations (Type, FieldInfo, MethodInfo or ConstructorInfo) used by the body of a given method or constructor and specifies additional options.
Public methodStatic memberGetDerivedTypes(Type)
Gets the set of types derived from a given class or implementing a given interface.
Public methodStatic memberGetDerivedTypes(Type, ReflectionSearchOptions)
Gets the set of types derived from a given class or implementing a given interface. and specifies additional options.
Public methodStatic memberGetMembersOfType(Type)
Gets all members (FieldInfo, PropertyInfo, or ParameterInfo) of the assembly being processed of a given type.
Public methodStatic memberGetMembersOfType(Type, ReflectionSearchOptions)
Gets all members (FieldInfo, PropertyInfo, or ParameterInfo) of the assembly being processed of a given type and specifies additional options.
Public methodStatic memberGetMethodsUsingDeclaration(MemberInfo)
Gets the set of methods and constructors whose body references a given (Type, FieldInfo, MethodInfo or ConstructorInfo).
Public methodStatic memberGetMethodsUsingDeclaration(MemberInfo, ReflectionSearchOptions)
Gets the set of methods and constructors whose body references a given (Type, FieldInfo, MethodInfo or ConstructorInfo) and specifies whether reflection wrappers should be used instead of runtime reflection objects.
Public methodStatic memberHasCustomAttribute
Determines whether a declaration has a custom attribute of a given type, including those who have been added indirectly, for instance through MulticastAttribute.
Top
Remarks

Note Note
This feature is available only at build time.

See Also