Ejemplo n.º 1
0
 public static T?C <T>(T?x, CharMayOptions options, string argumentName, string message = null) where T : struct
 {
     if (options is CharMayOptions.Default)
     {
         ValidationExceptionHelper.WrapAndRaise <ArgumentNullException>(
             x is not null,
             argumentName, message ?? $"The given nullable char should not be null.");
     }
     return(x);
 }
Ejemplo n.º 2
0
 public static void RequireWithinRange(this char?argument, char min, char max, string argumentName, string message = null, CharMayOptions options = CharMayOptions.Default)
 {
     CharGuard.ShouldBeWithinRange(argument, min, max, argumentName, message, options);
 }
Ejemplo n.º 3
0
 public static void ShouldBeWithinRange(char?argument, char min, char max, string argumentName, string message = null, CharMayOptions options = CharMayOptions.Default)
 {
     ShouldBeWithinRange(CharGuardHelper.C(argument, options, argumentName, message).SafeValue(), min, max, argumentName, message);
 }