예제 #1
0
 public static void ArgumentNotNullOrEmptyOrWhitespace(string value, string parameterName)
 {
     ValidationUtils.ArgumentNotNullOrEmpty(value, parameterName);
     if (StringUtils.IsWhiteSpace(value))
     {
         throw new ArgumentException("'{0}' cannot only be whitespace.".FormatWith(CultureInfo.InvariantCulture, new object[]
         {
             parameterName
         }), parameterName);
     }
 }
예제 #2
0
 public static bool IsNullOrEmptyOrWhiteSpace(string s)
 {
     if (string.IsNullOrEmpty(s))
     {
         return(true);
     }
     if (StringUtils.IsWhiteSpace(s))
     {
         return(true);
     }
     return(false);
 }
예제 #3
0
 public static bool IsNullOrEmptyOrWhiteSpace(string s)
 {
     return(string.IsNullOrEmpty(s) || StringUtils.IsWhiteSpace(s));
 }