예제 #1
0
 public DsnRecipientInfo(string displayName, string address, string addressType, string enhancedStatusCode, string statusText) : this(displayName, address, addressType, enhancedStatusCode, statusText, null, null, null, null, null)
 {
     if (!EnhancedStatusCodeImpl.IsValid(enhancedStatusCode))
     {
         throw new ArgumentException("Invalid enhanced status code");
     }
 }
예제 #2
0
        public static bool TryParse(string line, int startIndex, out EnhancedStatusCode enhancedStatusCode)
        {
            EnhancedStatusCodeImpl escImpl;
            bool flag = EnhancedStatusCodeImpl.TryParse(line, startIndex, out escImpl);

            enhancedStatusCode = null;
            if (flag)
            {
                enhancedStatusCode = new EnhancedStatusCode(escImpl);
            }
            return(flag);
        }
예제 #3
0
 private bool IsValid(string input)
 {
     return(input == null || (input.Length <= 7 && new Regex("^(5\\.7\\.1|5\\.7\\.[1-9][0-9]|5\\.7\\.[1-9][0-9][0-9])$", RegexOptions.Compiled).IsMatch(input) && EnhancedStatusCodeImpl.IsValid(input)));
 }
예제 #4
0
 public static bool IsValid(string status)
 {
     return(EnhancedStatusCodeImpl.IsValid(status));
 }
예제 #5
0
 private EnhancedStatusCode(EnhancedStatusCodeImpl escImpl)
 {
     this.enhancedStatusCodeImpl = escImpl;
 }