Пример #1
0
 internal void InitializeAsInherited()
 {
     RowManager = null;
     InternalScalarBindings.Clear();
     InternalBlockBindings.Clear();
     InternalRowBindings.Clear();
     _scalarAsyncValidators = Presenters.ScalarAsyncValidators.Empty;
     _rowAsyncValidators    = Presenters.RowAsyncValidators.Empty;
 }
Пример #2
0
        /// <summary>
        /// Creates a collection of scalar async validators.
        /// </summary>
        /// <param name="values">The validators.</param>
        /// <returns>The collection of scalar async validators.</returns>
        public static IScalarAsyncValidators New(params ScalarAsyncValidator[] values)
        {
            if (values == null)
            {
                throw new ArgumentNullException(nameof(values));
            }

            if (values.Length == 0)
            {
                return(Empty);
            }

            IScalarAsyncValidators result = values.VerifyNotNull(0, nameof(values));

            for (int i = 1; i < values.Length; i++)
            {
                result = result.Add(values.VerifyNotNull(i, nameof(values)));
            }
            return(result);
        }
Пример #3
0
 internal void AddAsyncValidator(ScalarAsyncValidator validator)
 {
     Debug.Assert(validator != null);
     validator.Initialize(this);
     _scalarAsyncValidators = _scalarAsyncValidators.Add(validator);
 }