Open sandboxFocus

Method GetIneligibilityJustification

GetIneligibilityJustification(EligibleScenarios, IDescribedObject<T>)

Gets a human-readable explanation for why the GetEligibility(T) method denied eligibility in a requested scenario.

Declaration
FormattableString? GetIneligibilityJustification(EligibleScenarios requestedEligibility, IDescribedObject<in T> describedObject)
Parameters
Type Name Description
EligibleScenarios requestedEligibility

The eligibility scenario that was requested by the user but denied by this rule.

IDescribedObject<T> describedObject

The object for which eligibility was denied, along with its formatted description.

Returns
Type Description
FormattableString

A FormattableString explaining why the object is not eligible, or null if no justification is needed. The string should describe what the object must be to satisfy the rule (e.g., "must not be static").