32 references to HttpParseResult
System.Net.Http (32)
System\Net\Http\Headers\AltSvcHeaderParser.cs (4)
303if (HttpRuleParser.GetQuotedStringLength(value, startIndex, out int quotedLength) != HttpParseResult.Parsed) 308Debug.Assert(value[startIndex] == '"' && value[startIndex + quotedLength - 1] == '"', $"{nameof(HttpRuleParser.GetQuotedStringLength)} should return {nameof(HttpParseResult.NotParsed)} if the opening/closing quotes are missing."); 404if (HttpRuleParser.GetQuotedStringLength(value, startIndex, out int quotedLength) == HttpParseResult.Parsed) 466if (HttpRuleParser.GetQuotedStringLength(value, startIndex, out int quotedLength) == HttpParseResult.Parsed)
System\Net\Http\Headers\AuthenticationHeaderValue.cs (1)
204HttpParseResult.Parsed)
System\Net\Http\Headers\EntityTagHeaderValue.cs (1)
123if (current == input.Length || HttpRuleParser.GetQuotedStringLength(input, current, out int tagLength) != HttpParseResult.Parsed)
System\Net\Http\Headers\HeaderUtilities.cs (2)
157if ((HttpRuleParser.GetCommentLength(value, 0, out int length) != HttpParseResult.Parsed) || 168if ((HttpRuleParser.GetQuotedStringLength(value, 0, out int length) != HttpParseResult.Parsed) ||
System\Net\Http\Headers\NameValueHeaderValue.cs (3)
337if (HttpRuleParser.GetQuotedStringLength(input, startIndex, out valueLength) != HttpParseResult.Parsed) 368HttpParseResult parseResult = HttpRuleParser.GetQuotedStringLength(value, 0, out int valueLength); 369if (parseResult != HttpParseResult.Parsed || valueLength != value.Length)
System\Net\Http\Headers\ProductInfoHeaderValue.cs (1)
134if (HttpRuleParser.GetCommentLength(input, current, out commentLength) != HttpParseResult.Parsed)
System\Net\Http\Headers\ViaHeaderValue.cs (1)
175if (HttpRuleParser.GetCommentLength(input, current, out int commentLength) != HttpParseResult.Parsed)
System\Net\Http\Headers\WarningHeaderValue.cs (1)
162if (HttpRuleParser.GetQuotedStringLength(input, current, out int textLength) != HttpParseResult.Parsed)
System\Net\Http\HttpRuleParser.cs (18)
177internal static HttpParseResult GetCommentLength(string input, int startIndex, out int length) 182internal static HttpParseResult GetQuotedStringLength(string input, int startIndex, out int length) 189internal static HttpParseResult GetQuotedPairLength(string input, int startIndex, out int length) 198return HttpParseResult.NotParsed; 205return HttpParseResult.InvalidFormat; 210return HttpParseResult.Parsed; 224private static HttpParseResult GetExpressionLength(string input, int startIndex, char openChar, 234return HttpParseResult.NotParsed; 244(GetQuotedPairLength(input, current, out quotedPairLength) == HttpParseResult.Parsed)) 257return HttpParseResult.InvalidFormat; 266return HttpParseResult.InvalidFormat; 270HttpParseResult nestedResult = GetExpressionLength(input, current, openChar, closeChar, 275case HttpParseResult.Parsed: 279case HttpParseResult.NotParsed: 285case HttpParseResult.InvalidFormat: 287return HttpParseResult.InvalidFormat; 301return HttpParseResult.Parsed; 307return HttpParseResult.InvalidFormat;