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.
Declaration
public IEligibilityBuilder<TOutput> To<TOutput>() where TOutput : class, TReturns
| Type | Description |
|---|---|
| IEligibilityBuilder<TOutput> | An eligibility builder for |
Type Parameters
| Name | Description |
|---|---|
| TOutput | The more specific type to convert to (must be derived from or the same as |
Remarks
If the validated object is not of type TOutput, the declaration becomes ineligible.
Use this when you want to ensure the declaration is of a specific type and add additional rules for that type.
For conditional rules that only apply when the declaration happens to be of a certain type (without making it ineligible if it's not), use When<TOutput>() instead.
See Also
When<TOutput>()