Open sandboxFocus

Class CopyCustomAttributesAttribute

Custom attribute that, when applied on an aspect class, requires custom attributes present on the aspect class to be copied to the target of this class. When applied on an introduced member (see IntroduceMemberAttribute), this custom attribute requires custom attributes present on the aspect member to be copied to the introduced member.

Inheritance
CopyCustomAttributesAttribute
Namespace: PostSharp.Aspects.Advices
Assembly: PostSharp.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Event)]
public sealed class CopyCustomAttributesAttribute : Advice

Constructors

Name Description
CopyCustomAttributesAttribute(Type)

Requires custom attributes present on the aspect class or aspect class member to be copied to the aspect target or to the introduced member, respectively.

CopyCustomAttributesAttribute(params Type[])

Requires custom attributes present on the aspect class or aspect class member to be copied to the aspect target or to the introduced member, respectively.

Properties

Name Description
OverrideAction

Determines what should happen when a custom attribute of the same type is already present on the target declaration.

Types

Gets the list of custom attribute types to be copied.

See Also