Master
Gets or sets the name of the master advice method of the group of the current advice.
Declaration
public string Master { get; set; }Property Value
| Type | Description |
|---|---|
| string |
Remarks
Only the master advice can define the pointcut (Pointcut) of the group; a pointcut on another advice is ignored, and the compiler reports a warning.
When this property is not set and the advice has a pointcut, the advice is the master of its own group. When it is not set and the
advice has no pointcut, the group is inferred: the advice joins the only master advice of the same family declared in its class, or else in the
nearest base class that declares one. When no class declares one, the advices of the class without Master and without pointcut
form one group, whose master is the advice that sets a property that only a master can set, such as Description, or
else the first advice. When several master advices could be selected, the compiler reports an error, and this property must be set.
An advice that sets this property cannot set SemanticallyAdvisedMethodKinds or UnsupportedTargetAction, which only the
master advice can set.