public static bool TryParse(string line, int startIndex, out EnhancedStatusCodeImpl enhancedStatusCode) { enhancedStatusCode = null; int length; if (!EnhancedStatusCodeImpl.CodeLength(line, startIndex, out length)) { return(false); } enhancedStatusCode = new EnhancedStatusCodeImpl(); enhancedStatusCode.code = line.Substring(startIndex, length); return(true); }
public static bool IsValid(string status) { int num; return(EnhancedStatusCodeImpl.CodeLength(status, 0, out num) && num == status.Length); }