PostSharp6.0/API Reference/Post­Sharp.​Reflection Namespace/Reflection­Search Class/Reflection­Search Methods/Reflection­Search.​Get­Methods­Using­Declaration Method/Reflection­Search.​Get­Methods­Using­Declaration Method (Member­Info, Reflection­Search­Options)

ReflectionSearch.GetMethodsUsingDeclaration Method (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.

Namespace:  PostSharp.Reflection
Assembly:  PostSharp (in PostSharp.dll) Version: 6.0.35.0 (6.0.35.0)
Syntax
C#
public static MethodUsageCodeReference[] GetMethodsUsingDeclaration(
	MemberInfo declaration,
	ReflectionSearchOptions options
)

Parameters

declaration
Type: System.Reflection.MemberInfo
The Type, FieldInfo, MethodInfo or ConstructorInfo whose references are requested.
options
Type: PostSharp.Reflection.ReflectionSearchOptions
Any combination of the options [!:ReflectionSearchOptions.UseReflectionWrappers] and IncludeTypeElement (partial type match).

Return Value

Type: MethodUsageCodeReference[]
An array of MethodUsageCodeReference containing one item for each method or constructor whose body references declaration.
Remarks

Note Note

Note Note
This feature is available only at build time.

See Also