PostSharp.ILAPI ReferencePost­Sharp.​ReflectionReflection­Search
Open sandboxFocus

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
ReflectionSearch
Namespace: PostSharp.Reflection
Assembly: PostSharp.dll
Syntax
public static class ReflectionSearch : Object

Methods

Name Description
GetCustomAttributesOfType(Type)

Gets all custom attributes of a given type in the assembly being currently processed.

GetCustomAttributesOfType(Type, ReflectionSearchOptions)

Gets all custom attributes of a given type in the assembly being currently processed and specifies additional options.

GetCustomAttributesOnTarget(Object)

Gets all custom attributes on a given element of code, including those who have been added indirectly, for instance through MulticastAttribute.

GetCustomAttributesOnTarget(Object, ReflectionSearchOptions)

Gets all custom attributes on a given element of code, including those who have been added indirectly, for instance through MulticastAttribute.

GetCustomAttributesOnTarget<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.

GetDeclarationsUsedByMethod(MethodBase)

Gets all declarations (Type, System.Reflection.FieldInfo, System.Reflection.MethodInfo or System.Reflection.ConstructorInfo) used by the body of a given method or constructor.

GetDeclarationsUsedByMethod(MethodBase, ReflectionSearchOptions)

Gets all declarations (Type, System.Reflection.FieldInfo, System.Reflection.MethodInfo or System.Reflection.ConstructorInfo) used by the body of a given method or constructor and specifies additional options.

GetDerivedTypes(Type)

Gets the set of types derived from a given class or implementing a given interface.

GetDerivedTypes(Type, ReflectionSearchOptions)

Gets the set of types derived from a given class or implementing a given interface. and specifies additional options.

GetMembersOfType(Type)

Gets all members (System.Reflection.FieldInfo, PropertyInfo, or ParameterInfo) of the assembly being processed of a given type.

GetMembersOfType(Type, ReflectionSearchOptions)

Gets all members (System.Reflection.FieldInfo, PropertyInfo, or ParameterInfo) of the assembly being processed of a given type and specifies additional options.

GetMethodsUsingDeclaration(MemberInfo)

Gets the set of methods and constructors whose body references a given (Type, System.Reflection.FieldInfo, System.Reflection.MethodInfo or System.Reflection.ConstructorInfo).

GetMethodsUsingDeclaration(MemberInfo, ReflectionSearchOptions)

Gets the set of methods and constructors whose body references a given (Type, System.Reflection.FieldInfo, System.Reflection.MethodInfo or System.Reflection.ConstructorInfo).

HasCustomAttribute(Object, Type, Boolean)

Determines whether a declaration has a custom attribute of a given type, including those who have been added indirectly, for instance through MulticastAttribute.