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

The default action, which is Fail.

Fail

Emits an error message.

Ignore

Silently ignores this custom attribute. The attribute is not copied, and no error message is emitted.

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