The base class for all attributes that validate usage.
Inheritance
Namespace: Metalama.Extensions.Architecture.Aspects
Assembly: Metalama.Extensions.Architecture.dll
Syntax
[CompileTime]
public abstract class BaseUsageValidationAttribute : Attribute, IConditionallyInheritableAspect, IAspect, ICompileTimeSerializable, ITemplateProvider
Constructors
Name | Description |
---|---|
BaseUsageValidationAttribute() |
Properties
Name | Description |
---|---|
CurrentAssembly | Gets a value indicating whether the rule is matched by the assembly in which the attribute is defined. |
CurrentNamespace | Gets a value indicating whether the rule is matched by the namespace of the type to which the attribute is defined. |
Description | Gets an optional description message appended to the warning message. |
ExclusionPredicateType | Gets a Type, derived from ReferencePredicate, that determines exclusions for the current
architecture rule. Specifically, no warning will be reported if the IsMatch(ReferenceValidationContext) method
of the ReferencePredicate returns |
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: |
ReferenceKinds | Gets the kinds of references that must be validated. The default value is All. |
TypeNames | Gets the full names of the types that match the rule. Any type string can contain one of the following patterns: |
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 |
---|---|
AddPredicatesFromAttributes(ReferencePredicateBuilder, INamespace, Action<ReferencePredicate>, in ScopedDiagnosticSink) | Adds the predicates defined by the properties of the current custom attribute. |
TryCreateExclusionPredicate(IAspectBuilder<IMemberOrNamedType>, ReferencePredicateBuilder, out ReferencePredicate?) | |
TryCreatePredicate(IAspectBuilder<IMemberOrNamedType>, ReferencePredicateBuilder, out ReferencePredicate?) | Creates a ReferencePredicate based on the properties of the custom attributes. |