PostSharp6.2/API Reference/Post­Sharp.​Aspects.​Advices Namespace/Custom­Attribute­Override­Action Enumeration

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: 6.2.13.0 (6.2.13.0)
Syntax
C#
public enum CustomAttributeOverrideAction
Members
  Member nameValueDescription
Default0 Default (Fail).
Fail0 Emits an error message.
Ignore1 Silently ignore this custom attribute (does not copy it, without error message).
Add2 Adds a new copy (possibly duplicate) of the custom attribute.
MergeAddProperty3 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.
MergeReplaceProperty4 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.
See Also