public static ValidationHandleOperation HandleAll(this ValidationHandleOperation op, IValidationHandler handler) { op.CheckNull(nameof(op)); handler.CheckNull(nameof(handler)); op.Handle(handler); return(op); }
public static ValidationHandleOperation HandleForFailure(this ValidationHandleOperation op, IValidationHandler handler) { op.CheckNull(nameof(op)); handler.CheckNull(nameof(handler)); op.Handle(handler, x => x.Where(y => !y.IsValid)); return(op); }
public static ValidationHandleOperation HandleForStrategy(this ValidationHandleOperation op, string name, IValidationHandler handler) { op.CheckNull(nameof(op)); handler.CheckNull(nameof(handler)); op.Handle(handler, name); return(op); }
internal void Handle(IValidationHandler handler, string strategyName) { handler.CheckNull(nameof(handler)); var coll = _collection.Filter(strategyName); if (coll == null) { return; } handler.Handle(coll); }
internal void Handle(IValidationHandler handler, Action <IEnumerable <ValidationResult> > filterFunc = null) { handler.CheckNull(nameof(handler)); var coll = filterFunc == null ? _collection : _collection.Filter(filterFunc); if (coll == null) { return; } handler.Handle(coll); }