Specifies how introduction advice should behave when a member with the same name or signature already exists in the target type.
Namespace: Metalama.Framework.Aspects
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public enum OverrideStrategyRemarks
This enumeration controls the conflict resolution strategy when introducing members (methods, properties, fields, events) or when implementing interfaces. The strategy determines whether to fail, skip, override, or hide the existing member.
The choice of strategy affects both compilation behavior and the AdviceOutcome returned by the advice result. For example, Ignore results in Ignore when a conflict is detected, while Override results in Override.
Fields
| Name | Description |
|---|---|
| Default | The advice fails with a compilation error if the member already exists in the target declaration. Same as Fail. |
| Fail | The advice fails with a compilation error if the member exists in the target declaration. |
| Ignore | Advice is ignored if the member already exists in the target declaration. |
| New | If the member already exists, the advice attempts to redefine it using |
| Override | Advice attempts to override the existing member or fails with a compilation error if that is not possible. |