MetalamaAPI documentationAspect APIMetalama.​Framework.​AspectsIAspect­Builder<TAspect­Target>Verify­Eligibility
Open sandboxFocus

IAspectBuilder<TAspectTarget>.VerifyEligibility Method

VerifyEligibility(IEligibilityRule<TAspectTarget>)

Verifies that the target of the aspect matches an eligibility rule. If not, reports an eligibility error (unless the aspect can be used by inheritance) and skips the aspect.

Declaration
bool VerifyEligibility(IEligibilityRule<TAspectTarget> rule)
Parameters
Type Name Description
IEligibilityRule<TAspectTarget> rule

An eligibility rule created by EligibilityRuleFactory. For performance reasons, it is recommended that you store the rule in a static field of the aspect.

Returns
Type Description
System.Boolean

true if the aspect target qualifies for the given rule, otherwise false (in this case, the SkipAspect() method is automatically called.