public static class RunicPendingValidationExtensions Follows validation streams with a RunicPendingValidation.
Methods
TrackPending
public static IObservable<T> TrackPending<T>(this IObservable<T> states, RunicPendingValidation pending, string memberPath, Func<T, bool> isPending) Marks memberPath pending while the latest value of states is a pending state, until the subscription ends. With ReactiveUI.Validation, pass the stream of an asynchronous rule and recognize the pending state it starts each check with:
var checking = new ValidationState(true, "Checking…");
var states = ValidationAsync.ForLatest(this.WhenAnyValue(vm => vm.UserName), CheckAsync, checking, scheduler)
.TrackPending(Pending, nameof(UserName), state => ReferenceEquals(state, checking));
this.ValidationRule(vm => vm.UserName, states);Parameters
statesThe validation states, or any values whose latest one tells whether a check runs.
pendingThe tracker the ViewModel reports through
IRunicPendingValidation.memberPathA relative CLR property path, or
""for the object.isPendingWhether a value means that a check is in progress.