Open sandboxFocus

Class AdviceInstance

Base class for advice instances, which the aspect can provide dynamically through the IAdviceProvider interface.

Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp.dll
Syntax
public abstract class AdviceInstance
Remarks

The advices that an aspect can provide are ImportLocationAdviceInstance, ImportMethodAdviceInstance, IntroduceMethodAdviceInstance and IntroduceInterfaceAdviceInstance. Import advices and interface introductions require an instance-scoped aspect, such as an InstanceLevelAspect.

Constructors

Name Description
AdviceInstance()

Properties

Name Description
Description

Gets or sets a human-readable description of the current advice instance.

LinesOfCodeAvoided

Gets or sets the number of lines of hand-written code that this specific AdviceInstance avoids.

MasterAspectMember

Gets the main field or method of the aspect class that the current AdviceInstance relates to.

See Also