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)
171internal static HttpParseResult GetCommentLength(string input, int startIndex, out int length) 176internal static HttpParseResult GetQuotedStringLength(string input, int startIndex, out int length) 183internal static HttpParseResult GetQuotedPairLength(string input, int startIndex, out int length) 192return HttpParseResult.NotParsed; 199return HttpParseResult.InvalidFormat; 204return HttpParseResult.Parsed; 218private static HttpParseResult GetExpressionLength(string input, int startIndex, char openChar, 228return HttpParseResult.NotParsed; 238(GetQuotedPairLength(input, current, out quotedPairLength) == HttpParseResult.Parsed)) 251return HttpParseResult.InvalidFormat; 260return HttpParseResult.InvalidFormat; 264HttpParseResult nestedResult = GetExpressionLength(input, current, openChar, closeChar, 269case HttpParseResult.Parsed: 273case HttpParseResult.NotParsed: 279case HttpParseResult.InvalidFormat: 281return HttpParseResult.InvalidFormat; 295return HttpParseResult.Parsed; 301return HttpParseResult.InvalidFormat;