PostSharpAPI ReferencePost­Sharp.​ReflectionMethod­Usage­Code­Reference
Open sandboxFocus

MethodUsageCodeReference Class

Represents a relationship between a declaration (Type, FieldInfo, MethodInfo or ConstructorInfo) and a method whose instructions (method body) use the declaration.

Inheritance
MethodUsageCodeReference
Implements
ICodeReference
Namespace: PostSharp.Reflection
Assembly: PostSharp.dll
Syntax
public sealed class MethodUsageCodeReference : Object, ICodeReference

Properties

Name Description
Instructions

Gets the instructions that reference UsedDeclaration.

UsedDeclaration

Gets the declaration (Type, MethodInfo or ConstructorInfo) used by the method.

UsedType

Gets the Type used by the method. If the current object represents a reference to a MethodInfo or ConstructorInfo, this property returns the declaring type of the method or constructor.

UsingMethod

Gets the method (MethodInfo or ConstructorInfo) whose body uses the declaration.

Explicit Interface Implementations

Name Description
ICodeReference.ReferencedDeclaration

Gets the declaration referenced by the other.

ICodeReference.ReferenceKind

Gets the kind of code reference.

ICodeReference.ReferencingDeclaration

Gets the declaration referencing the other.