Base class for all advices that are possibly composed of multiple advices that can be grouped together using the Master property.
Inheritance
Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp.dll
Syntax
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public abstract class GroupingAdvice : AdviceRemarks
Advices of the same family, for example OnMethodEntryAdvice and OnMethodExitAdvice, can be grouped so that they are woven as a single transformation, consistent with the code generated by the corresponding simple aspect, such as OnMethodBoundaryAspect. Without grouping, the order of the advices determines how they are nested.
A group has one master advice, which is the only advice of the group that can have a pointcut. The group is inferred when it is unambiguous: an advice without pointcut and without Master joins the only master advice of its family declared in its class. When the class declares several master advices of the same family, set Master on the other advices of the group to the name of the master advice method, and do not specify any pointcut on them.
Constructors
| Name | Description |
|---|---|
| GroupingAdvice() |
Properties
| Name | Description |
|---|---|
| Master | Gets or sets the name of the master advice method of the group of the current advice. |