PostSharpAPI ReferencePost­Sharp.​ConstraintsComponent­Internal­Attribute
Open sandboxFocus

ComponentInternalAttribute Class

ReferentialConstraint that, when applied on a declaration, limits the scope (namespace or type) in which this declaration can be used. This constraint is useful to isolate several components from each other, even if they are implemented in the same assembly. The ComponentInternal constraint sets the visibility of a declaration between internal and private.

Namespace: PostSharp.Constraints
Assembly: PostSharp.dll
Syntax
public sealed class ComponentInternalAttribute : ReferenceConstraint, IReferentialConstraint, IConstraint

Constructors

Name Description
ComponentInternalAttribute()

Initializes a ComponentInternalAttribute restricting the target declaration from being used from another namespace than the namespace of the declaration.

ComponentInternalAttribute(String[])

Initializes a ComponentInternalAttribute restricting the target declaration from being used outside of given types or namespaces, given by strings.

ComponentInternalAttribute(Type[])

Initializes a ComponentInternalAttribute restricting the target declaration from being used outside of given types or namespaces, given as Type.

Properties

Name Description
Severity

Gets or sets the severity of messages emitted by this constraint.

Methods

Name Description
ValidateReference(ICodeReference)

Validates a reference to the target declaration of the current constraint.