Created
November 15, 2012 16:00
-
-
Save orient-man/4079379 to your computer and use it in GitHub Desktop.
Validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace MyCompany.Infrastructure.Validation | |
{ | |
// implemented in UI layer | |
public interface IValidationListener | |
{ | |
void OnError(string error); | |
void OnWarning(string warning); | |
bool IsIgnored(string warning); | |
} | |
// stops on first error but reports all warnings | |
public interface IValidator | |
{ | |
/// <returns>False if any error or warning</returns> | |
bool Validate(IValidationListener listener); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment