Open sandboxFocus

Struct EligibilityExtensions.Converter<T>

A helper type that allows converting an IEligibilityBuilder<T> to an IEligibilityBuilder<T> for a more specific type, with different conversion semantics.

Namespace: Metalama.Framework.Eligibility
Assembly: Metalama.Framework.dll
Syntax
public readonly struct EligibilityExtensions.Converter<T> where T : class
Type Parameters
Name Description
T

The source declaration type.

Remarks

This struct is returned by Convert<T>(IEligibilityBuilder<T>) and provides two conversion methods:

  • To<TOutput>() - Adds an eligibility requirement that the declaration must be of the target type.
  • When<TOutput>() - Conditionally applies rules only when the declaration is of the target type, without adding a requirement.

Methods

Name Description
To<TOutput>()

Converts to an IEligibilityBuilder<T> for a more specific type and adds an eligibility requirement that the declaration must be of the specified type.

When<TOutput>()

Converts to an IEligibilityBuilder<T> for a more specific type, but only applies rules conditionally when the declaration is of the specified type. Does not add an eligibility requirement.

See Also