Metalama 1.0 / / Metalama Documentation / Extensions API / Metalama.​Extensions.​Architecture.​Predicates / Reference­Predicate

Class ReferencePredicate

The base class for predicates that applies to a ReferenceValidationContext. Standard extension methods are provided on ReferencePredicateExtensions. You can create your own predicates by deriving a new class from this one and exposing the API as a extension methods of ReferencePredicateBuilder.

Inheritance
ReferencePredicate
Namespace: Metalama.Extensions.Architecture.Predicates
Assembly: Metalama.Extensions.Architecture.dll
Syntax
public abstract class ReferencePredicate : Object, ICompileTimeSerializable
Remarks

This class implements ICompileTimeSerializable. All predicates must therefore be serializable.

Constructors

Name Description
ReferencePredicate(ReferencePredicateBuilder)

Initializes a new instance of the ReferencePredicate class.

Properties

Name Description
Builder

Gets the ReferencePredicateBuilder from which the current predicate was built, or null if the object was null without a ReferencePredicateBuilder.

Methods

Name Description
IsMatch(in ReferenceValidationContext)

Gets a value indicating whether the predicate matches the given ReferenceValidationContext.

Extension Methods

ReferencePredicateExtensions.Or(ReferencePredicate, Func<ReferencePredicateBuilder, ReferencePredicate>)
ReferencePredicateExtensions.Or(ReferencePredicate, ReferencePredicate)
ReferencePredicateExtensions.And(ReferencePredicate, Func<ReferencePredicateBuilder, ReferencePredicate>)
ReferencePredicateExtensions.And(ReferencePredicate, ReferencePredicate)
ReferencePredicateExtensions.Not(ReferencePredicate)