Last active
September 12, 2018 02:53
-
-
Save jrob5756/81b7e42fd0b7214944c79b4f0ad80658 to your computer and use it in GitHub Desktop.
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
public class InputProcessor | |
{ | |
private readonly IEnumerable<IValidator> _validators; | |
public InputProcessor(IEnumerable<IValidator> validators) | |
{ | |
_validators = validators; | |
} | |
public void Process(string input) | |
{ | |
foreach (var validator in _validators) | |
{ | |
var result = validator.Validate(input); | |
if (result.IsValid == false) | |
{ | |
// Removed for brevity | |
} | |
} | |
// Removed for brevity | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment