private static int ParseMailAddress(string value, int startIndex, out object parsedValue) { parsedValue = null; if (HttpRuleParser.ContainsInvalidNewLine(value, startIndex)) { return(0); } string result = value.Substring(startIndex); if (!HeaderUtilities.IsValidEmailAddress(result)) { return(0); } parsedValue = result; return(result.Length); }