CustomAttributeOverrideAction Enumeration |
Behavior of CopyCustomAttributesAttribute when a custom
attribute of the same type already exists on the target declaration.
Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp (in PostSharp.dll) Version: 2023.0.3.0 (2023.0.3.0)
C#
public enum CustomAttributeOverrideAction
Member name | Value | Description | |
---|---|---|---|
Default | 0 | Default (Fail). | |
Fail | 0 | Emits an error message. | |
Ignore | 1 | Silently ignore this custom attribute (does not copy it, without error message). | |
Add | 2 | Adds a new copy (possibly duplicate) of the custom attribute. | |
MergeAddProperty | 3 | Merges the existing custom attribute with the template custom attribute by adding properties and fields. If the existing custom attribute defines the same properties and fields as the template custom attribute, they are not overridden. | |
MergeReplaceProperty | 4 | Merges the existing custom attribute with the template custom attribute by adding and replacing properties and fields. If the existing custom attribute defines the same properties and fields as the template custom attribute, they are replaced by the values defined in the template custom attribute. |