Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Validation Service Results
public class ValidationResults
{
public ValidationResults(List<Error> errors)
{
this.Errors = errors;
}
public List<Error> Errors { get; private set; }
public static ValidationResults Empty()
{
return new ValidationResults(new List<Error>());
}
public bool IsValid()
{
return !this.Errors.Any();
}
public void Append(ValidationResults validationResults)
{
this.Errors.AddRange(validationResults.Errors);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment