Open sandboxFocus

Enum CustomAttributeOverrideAction

Behavior of CopyCustomAttributesAttribute when a custom attribute of the same type already exists on the target declaration.

Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp.dll
Syntax
public enum CustomAttributeOverrideAction

Fields

Name Description
Add

Adds a new copy (possibly duplicate) of the custom attribute.

Default

Default (Fail).

Fail

Emits an error message.

Ignore

Silently ignore this custom attribute (does not copy it, without error message).

MergeAddProperty

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

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