PostSharp 4.3 / / Post­Sharp Documentation / 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: (
public static MethodUsageCodeReference[] GetMethodsUsingDeclaration(
	MemberInfo declaration,
	ReflectionSearchOptions options


Type: System.Reflection.MemberInfo
The Type, FieldInfo, MethodInfo or ConstructorInfo whose references are requested.
Type: PostSharp.Reflection.ReflectionSearchOptions
Any combination of the options 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.

Note Note

Note Note
This feature is available only at build time.
See Also