public IDataValidationErrors Add(DataValidationError value) { value.VerifyNotNull(nameof(value)); if (!IsSealed) { _list.Add(value); return(this); } if (Count == 0) { return(value); } else { var result = new ListGroup(); for (int i = 0; i < Count; i++) { result.Add(this[i]); } result.Add(value); return(result); } }
public ListGroup(DataValidationError value1, DataValidationError value2) { Debug.Assert(value1 != null && value2 != null); Add(value1); Add(value2); }
internal static IDataValidationErrors New(DataValidationError value1, DataValidationError value2) { Debug.Assert(value1 != null && value2 != null && value1 != value2); return(new ListGroup(value1, value2)); }
public IDataValidationErrors Add(DataValidationError value) { value.VerifyNotNull(nameof(value)); return(value); }
IDataValidationErrors IDataValidationErrors.Add(DataValidationError value) { value.VerifyNotNull(nameof(value)); return(DataValidationErrors.New(this, value)); }