예제 #1
0
        public CachingValidatorSource(IValidatorSource other)
        {
            if (other== null) throw new ArgumentNullException("other");

            _cache = new Cache<string, List<IValidator>>(
                StringComparer.OrdinalIgnoreCase,
                key => other.For(key).ToList());
        }
예제 #2
0
 public MessageValidator(IValidatorSource source)
 {
     _source = source;
 }
 public CachingValidatorSourceTests()
 {
     _other = Substitute.For<IValidatorSource>();
     _cached = new CachingValidatorSource(_other);
 }