MetalamaAPI documentationExtensions APIMetalama.​Extensions.​Architecture.​AspectsBase­Usage­Validation­AttributeAdd­Predicates­From­Attributes
Open sandboxFocus

BaseUsageValidationAttribute.AddPredicatesFromAttributes Method

AddPredicatesFromAttributes(INamespace, Action<ReferencePredicate>, in ScopedDiagnosticSink)

Adds the predicates defined by the properties of the current custom attribute.

Declaration
protected virtual bool AddPredicatesFromAttributes(INamespace currentNamespace, Action<ReferencePredicate> addPredicate, in ScopedDiagnosticSink diagnostics)
Parameters
Type Name Description
INamespace currentNamespace

The namespace in which the current attribute is used.

Action<ReferencePredicate> addPredicate

A delegate to call to add a predicate. If many predicates are added, they will be combined with the Or(ReferencePredicate, Func<ReferencePredicateBuilder, ReferencePredicate>) method.

ScopedDiagnosticSink diagnostics
Returns
Type Description
Boolean