예제 #1
0
        public static void IsValid <T>([InvokerParameterName] string paramName, T paramValue, IValueValidator <T> validator)
        {
            IsNotNull(nameof(validator), validator);

            IsValid(paramName, paramValue, validator.IsValid(paramValue));
        }
예제 #2
0
 public static bool IsValid <TValue>(this IValueValidator <TValue> validator, TValue value)
 => validator.IsValid(Option.None <object>(), value);
예제 #3
0
        public static void IsValid <T>(string paramName, T paramValue, IValueValidator <T> validator)
        {
            Argument.IsNotNull("validator", validator);

            IsValid(paramName, paramValue, validator.IsValid(paramValue));
        }
예제 #4
0
 public static bool IsValid <TValue>(this IValueValidator <TValue> validator, TValue value)
 => validator.IsValid(value);