/// <summary> /// Creates a collection of row async validators. /// </summary> /// <param name="values">The validators.</param> /// <returns>The collection of row async validators.</returns> public static IRowAsyncValidators New(params RowAsyncValidator[] values) { if (values == null) { throw new ArgumentNullException(nameof(values)); } if (values.Length == 0) { return(Empty); } IRowAsyncValidators result = values.VerifyNotNull(0, nameof(values)); for (int i = 1; i < values.Length; i++) { result = result.Add(values.VerifyNotNull(i, nameof(values))); } return(result); }
internal void AddAsyncValidator(RowAsyncValidator validator) { Debug.Assert(validator != null); validator.Initialize(this); _rowAsyncValidators = _rowAsyncValidators.Add(validator); }