private bool VisitChildren(IValidationStrategy strategy) { var isValid = true; var enumerator = strategy.GetChildren(_metadata, _key, _model); var parentEntry = new ValidationEntry(_metadata, _key, _model); while (enumerator.MoveNext()) { var entry = enumerator.Current; var metadata = entry.Metadata; var key = entry.Key; if (metadata.PropertyValidationFilter?.ShouldValidateEntry(entry, parentEntry) == false) { SuppressValidation(key); continue; } isValid &= Visit(metadata, key, entry.Model); } return(isValid); }
/// <inheritdoc /> public bool ShouldValidateEntry(ValidationEntry entry, ValidationEntry parentEntry) { return(false); }