PostSharp.ILAPI ReferencePost­Sharp.​ReflectionMethod­Usage­Code­Reference
Open sandboxFocus

MethodUsageCodeReference Class

Represents a relationship between a declaration (Type, System.Reflection.FieldInfo, System.Reflection.MethodInfo or System.Reflection.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, System.Reflection.MethodInfo or System.Reflection.ConstructorInfo) used by the method.

UsedType

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

UsingMethod

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

Explicit Interface Implementations

Name Description
ICodeReference.ReferencedDeclaration
ICodeReference.ReferenceKind
ICodeReference.ReferencingDeclaration