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. This interface exposes LINQ-like methods that can be combined in complex queries.

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.

ValidateInboundReferences(InboundReferenceValidator)

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

ValidateInboundReferences(Action<ReferenceValidationContext>, ReferenceGranularity, ReferenceKinds, ReferenceValidationOptions)

Registers an inbound reference validator, provided as a delegate. The reference validator will be invoked to validate any references pointing to 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.

ValidateReferences(ReferenceValidator)
ValidateReferences(ValidatorDelegate<ReferenceValidationContext>, ReferenceKinds, bool)