Interface IOptionValidator<TOption>
Can be used in conjunction with an OptionFinder (First and Cheapest) to validate and/or reserve options.
Namespace: AnyPath.Managed
Assembly: AnyPath.dll
Syntax
public interface IOptionValidator<in TOption>
Type Parameters
| Name | Description |
|---|---|
| TOption | The type of target |
Methods
Validate(TOption)
Return wether this target is eligable for a result. This is called before the request is made and once again after a path associated with the option object has been found. The second call is to account for the fact that the option's state may have changed in the time it took to perform the request on another thread. If the second call returns falls, the request is retried and other options are considered.
Declaration
bool Validate(TOption option)
Parameters
| Type | Name | Description |
|---|---|---|
| TOption | option | The option to validate |
Returns
| Type | Description |
|---|---|
| bool | True if the option is eligable |