Exemplo n.º 1
0
        internal static IEnumerable <IAsyncTextValidator> UnwrapAllAsync(this IAsyncTextValidator textValidator)
        {
            if (textValidator is IAsyncWrappedValidator wrappedValidators)
            {
                var wrapped = wrappedValidators.GetWrappedAsyncValidators();

                foreach (var validator in UnwrapAllAsync(wrapped))
                {
                    yield return(validator);
                }
            }

            yield return(textValidator);
        }
Exemplo n.º 2
0
 public static IAsyncTextValidator WrapAsync(this IAsyncTextValidator textValidator, ITextValidator otherTextValidator)
 {
     return(new AsyncMultipleTextValidators(textValidator, new AsyncWrapTextValidator(otherTextValidator)));
 }
Exemplo n.º 3
0
 public AsyncMultipleTextValidators(IAsyncTextValidator asyncTextValidator, ITextValidator textValidator)
 {
     _textValidators = asyncTextValidator.WrapAsync(textValidator).UnwrapAllAsync();
 }