Post­Sharp Documentation / API Reference / Post­Sharp.​Aspects.​Advices Namespace / Copy­Custom­Attributes­Attribute Class

CopyCustomAttributesAttribute Class

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 Hierarchy
System.Object
  System.Attribute
    PostSharp.Aspects.Advices.Advice
      PostSharp.Aspects.Advices.CopyCustomAttributesAttribute

Namespace:  PostSharp.Aspects.Advices
Assembly:  PostSharp (in PostSharp.dll) Version: 5.0.38.0 (5.0.38.0)
Syntax
C#
public sealed class CopyCustomAttributesAttribute : Advice

The CopyCustomAttributesAttribute type exposes the following members.

Constructors
  NameDescription
Public methodCopyCustomAttributesAttribute(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.
Public methodCopyCustomAttributesAttribute(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
  NameDescription
Public propertyDescription
A human-readable description of the current advice.
(Inherited from Advice.)
Public propertyLinesOfCodeAvoided
Reduction in the code lines count achieved by applying the advice instance to one code element.
(Inherited from Advice.)
Public propertyOverrideAction
Determines what should happen when a custom attribute of the same type is already present on the target declaration.
Public propertyTypes
Gets the list of custom attribute types to be copied.
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
Remarks
See Also