Open sandboxFocus

Class RequirePostSharpAttribute

Custom attribute that, when applied on another custom attribute (a class derived from Attribute), means that assemblies with elements annotated with that custom attribute should be processed by PostSharp.

Inheritance
RequirePostSharpAttribute
Namespace: PostSharp.Extensibility
Assembly: PostSharp.dll
Syntax
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Interface, AllowMultiple = true)]
public sealed class RequirePostSharpAttribute : Attribute

Constructors

Name Description
RequirePostSharpAttribute(string)

Initializes a new RequirePostSharpAttribute and specifies the required plug-in name. All implicit (auto-included) tasks of that plug-in will be added to the project.

RequirePostSharpAttribute(string, string)

Initializes a new RequirePostSharpAttribute and specifies the required plug-in name and task name.

RequirePostSharpAttribute(Type)

Initializes a new RequirePostSharpAttribute and specifies the required IService type.

Properties

Name Description
AnyTypeReference

Determines whether the current attribute applies to any project that has any reference of the target type. If false, the requirement will apply only to assemblies that use the target type as a custom attribute. If true, the requirement will apply to any assembly that references the target type. The default value is false.

AssemblyReferenceOnly

Determines whether the requirement should apply only to assemblies referencing the declaration to which the custom attribute is applied. If true, the requirement will not apply to the assembly where the custom attribute is used.

PlugIn

Gets the name of the required plug-in (file name without the extension).

ServiceType

Gets the type of the required IService.

Task

Gets the name of the required task (should be defined in PlugIn).