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); }
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); }
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); }