PostSharpAPI ReferencePost­Sharp.​Aspects.​AdvicesCustom­Attribute­Override­Action
Open sandboxFocus

CustomAttributeOverrideAction Class

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

Inheritance
CustomAttributeOverrideAction
Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp.dll
Syntax
public sealed class CustomAttributeOverrideAction : Enum

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.

value__

See Also