Metalama 1.0 / / Metalama Documentation / Extensions API / Metalama.​Extensions.​Architecture.​Aspects / Base­Usage­Validation­Attribute

Class BaseUsageValidationAttribute

The base class for all attributes that validate usage.

Namespace: Metalama.Extensions.Architecture.Aspects
Assembly: Metalama.Extensions.Architecture.dll
Syntax
[CompileTime]
public abstract class BaseUsageValidationAttribute : Attribute, IConditionallyInheritableAspect, IAspect, ICompileTimeSerializable

Constructors

Name Description
BaseUsageValidationAttribute()

Properties

Name Description
CurrentNamespace

Gets a value indicating whether the rule is matched by the namespace of the type to which the aspect is defined.

Description

Gets an optional description message appended to the warning message.

NamespaceOfTypes

Gets the namespaces that match the rule by specifying a set of types directly contained in the namespaces.

Namespaces

Gets the namespaces that match the rule by identifying the namespaces by their full name. Any namespace string can contain one of the following patterns: (matches any identifier character, but not the dot), .. (matches any sub-namespace in the middle of a namespace), . (matches any sub-namespace at the beginning of a namespace) or .* (matches any sub-namespace at the end of a namespace -- this pattern is allowed but redundant).

Types

Gets the types that match the rule.

ValidateDerivedTypes

Gets a value indicating whether the types that are derived from the target type should also be validated, e.g. whether the aspect is inheritable.

Methods

Name Description
CreatePredicate(INamespace)

Creates a ReferencePredicate based on the current attribute.

Explicit Interface Implementations

Name Description
IConditionallyInheritableAspect.IsInheritable