MetalamaAPI documentationAspect APIMetalama.​Framework.​ValidationIValidator­Receiver
Open sandboxFocus

IValidatorReceiver Interface

The non-generic base interface for IValidatorReceiver<TDeclaration>. Represents a set of declarations to which validators, diagnostics and code fix suggestions can be added.

Namespace: Metalama.Framework.Validation
Assembly: Metalama.Framework.dll
Syntax
[CompileTime]
public interface IValidatorReceiver

Methods

Name Description
Validate(ValidatorDelegate<DeclarationValidationContext>)

Registers a method that will be invoked to validate any declaration in the current set. This method must have a parameter of type inDeclarationValidationContext.

ValidateReferences(ReferenceValidator)

Registers a reference validator, provided as an instance of the ReferenceValidator abstract class. The reference validator will be invoked to validate references to any declaration in the current set. Only source code references are validated. References added by aspects are ignored by design.

ValidateReferences(ValidatorDelegate<ReferenceValidationContext>, ReferenceKinds, Boolean)

Registers a reference validator, provided as a delegate. The reference validator will be invoked to validate references to any declaration in the current set. This method must have a parameter of type inReferenceValidationContext. Only source code references are validated. References added by aspects are ignored by design.