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"); } }
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); }
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))); }
public static bool IsValid(string status) { return(EnhancedStatusCodeImpl.IsValid(status)); }
private EnhancedStatusCode(EnhancedStatusCodeImpl escImpl) { this.enhancedStatusCodeImpl = escImpl; }