This is the online documentation for PostSharp 5.0.
Download PDF or CHM. Go to v4.3 or v5.0

Advice Class

Base class for all custom attributes representing an advice.
Inheritance Hierarchy
System.Object
  System.Attribute
    PostSharp.Aspects.Advices.Advice
      More...

Namespace:  PostSharp.Aspects.Advices
Assembly:  PostSharp (in PostSharp.dll) Version: 5.0.34.0 (5.0.34.0)
Syntax
C#
public abstract class Advice : Attribute

The Advice type exposes the following members.

Constructors
  NameDescription
Protected methodAdvice
Initializes a new instance of the Advice class
Top
Properties
  NameDescription
Public propertyDescription
A human-readable description of the current advice.
Public propertyLinesOfCodeAvoided
Reduction in the code lines count achieved by applying the advice instance to one code element.
Top
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
Top
Remarks

Advices are behaviors added to aspects by the way of custom attributes. Other ways to add behaviors is to implement interface methods.

Advice custom attributes are typically used on aspect classes, or on members of aspect classes.

See Also
Inheritance Hierarchy