PostSharpAPI ReferencePost­Sharp.​ReflectionReflection­SearchGet­Methods­Using­Declaration
Open sandboxFocus

ReflectionSearch.GetMethodsUsingDeclaration Method

GetMethodsUsingDeclaration(MemberInfo)

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

Declaration
public static MethodUsageCodeReference[] GetMethodsUsingDeclaration(MemberInfo declaration)
Parameters
Type Name Description
System.Reflection.MemberInfo declaration

The System.Type, System.Reflection.FieldInfo, MethodInfo or ConstructorInfo whose references are requested.

Returns
Type Description
MethodUsageCodeReference[]

An array of MethodUsageCodeReference containing one item for each method or constructor whose body references declaration.

Remarks

note

This feature is available only at build time.

GetMethodsUsingDeclaration(MemberInfo, ReflectionSearchOptions)

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

Declaration
public static MethodUsageCodeReference[] GetMethodsUsingDeclaration(MemberInfo declaration, ReflectionSearchOptions options)
Parameters
Type Name Description
System.Reflection.MemberInfo declaration

The System.Type, System.Reflection.FieldInfo, MethodInfo or ConstructorInfo whose references are requested.

ReflectionSearchOptions options

This parameter has no effect and is kept only for backwards compatibility.

Returns
Type Description
MethodUsageCodeReference[]

An array of MethodUsageCodeReference containing one item for each method or constructor whose body references declaration.

Remarks

note

This feature is available only at build time.