Open sandboxFocus

Class ReferencePredicateValidator

Inheritance
ReferencePredicateValidator
Namespace: Metalama.Extensions.Architecture.Validators
Assembly: Metalama.Extensions.Architecture.dll
Syntax
[CompileTime]
public class ReferencePredicateValidator : InboundReferenceValidator, ICompileTimeSerializable

Constructors

Name Description
ReferencePredicateValidator(ReferencePredicate, string?, ReferenceKinds)

Properties

Name Description
Granularity

Gets level of declarations at which the analysis should be performed. For instance, if the ValidateReferences(ReferenceValidationContext) method only depends on the namespace of the referencing syntax (as opposed to its declaring member or type), then Granularity should be set to Namespace, and ValidateReferences(ReferenceValidationContext) will be invoked a single time per namespace.

ValidatedReferenceKinds

Gets the kinds of references for which the ValidateReferences(ReferenceValidationContext) method should be invoked. For optimal performance, the set should be restricted to its required minimum. Flags that are not compatible with the validated kind of declarations are automatically ignored.

Methods

Name Description
ValidateReferences(ReferenceValidationContext)

Validates a reference and reports a warning if necessary.