Group
Gets or sets the name of the group of the current advice. The advices of the aspect that have the same value form one group, whatever the class that declares them.
Declaration
public string Group { get; set; }Property Value
| Type | Description |
|---|---|
| string |
Remarks
Set this property when the group of the advice cannot be inferred, for instance when the class has two groups that have no exit advice yet, or to give the advice a group of its own that applies to the target of the aspect in a class whose other groups have pointcuts. To add an advice of a derived class to a group of a base class, give it the name of that group.
In a sealed class, when this property selects the group that the inference gives anyway, it is redundant, and the compiler reports a warning. In a class that can be derived, the name of a group is part of its contract with the derived classes, and is never reported. This property cannot be set together with Master.