| @@ -13,12 +13,17 namespace Implab | |||
| 
             | 
        13 | 13 | if (rx == null) | 
| 
             | 
        14 | 14 | throw new ArgumentNullException("rx"); | 
| 
             | 
        15 | 15 | if (!rx.IsMatch(param)) | 
| 
             | 
        16 | 
            
                             throw new ArgumentException(String.Format(" | 
    |
| 
             | 
        16 | throw new ArgumentException(String.Format("The prameter value must match {0}", rx), name); | |
| 
             | 
        17 | 17 | } | 
| 
             | 
        18 | 18 | |
| 
             | 
        19 | 19 | public static void ArgumentNotEmpty(string param, string name) { | 
| 
             | 
        20 | 20 | if (String.IsNullOrEmpty(param)) | 
| 
             | 
        21 | 
            
                             throw new ArgumentException(" | 
    |
| 
             | 
        21 | throw new ArgumentException("The parameter can't be empty", name); | |
| 
             | 
        22 | } | |
| 
             | 
        23 | ||
| 
             | 
        24 | public static void ArgumentNotEmpty<T>(T[] param, string name) { | |
| 
             | 
        25 | if (param == null || param.Length == 0) | |
| 
             | 
        26 | throw new ArgumentException("The array must be not emty"); | |
| 
             | 
        22 | 27 | } | 
| 
             | 
        23 | 28 | |
| 
             | 
        24 | 29 | public static void ArgumentNotNull(object param, string name) { | 
        
        General Comments 0
    
    
  
  
                      You need to be logged in to leave comments.
                      Login now
                    
                