PostSharp6.2/API Reference/Post­Sharp.​Reflection Namespace/Reflection­Search Class/Reflection­Search Methods/Reflection­Search.​Get­Declarations­Used­By­Method Method/Reflection­Search.​Get­Declarations­Used­By­Method Method (Method­Base)

ReflectionSearch.GetDeclarationsUsedByMethod Method (MethodBase)

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

Namespace:  PostSharp.Reflection
Assembly:  PostSharp (in PostSharp.dll) Version: 6.2.13.0 (6.2.13.0)
Syntax
C#
public static MethodUsageCodeReference[] GetDeclarationsUsedByMethod(
	MethodBase method
)

Parameters

method
Type: System.Reflection.MethodBase
A MethodInfo or ConstructorInfo.

Return Value

Type: MethodUsageCodeReference[]
An array of MethodUsageCodeReference containing one item for each declaration used by the body of method.
Remarks

Note Note
This feature is available only at build time.

See Also