This file contains hidden or 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 interface IValidationHandler<in T> where T : Command { | |
ValidationResult Validate(T cmd); | |
} | |
public interface ICommandValidator { | |
ValidationResult Validate<T>(T command) where T : Command; | |
} | |
public class CommandValidator : ICommandValidator { | |
private readonly IDictionary<Type, Func<object, ValidationResult>> _validationHandlers |