7 references to TryParse
Microsoft.AspNetCore.HeaderParsing (1)
Parsers\RangeHeaderValueParser.cs (1)
16if (values.Count != 1 || !RangeHeaderValue.TryParse(values[0], out var parsedValue))
Microsoft.AspNetCore.Http.Extensions (1)
HeaderDictionaryTypeExtensions.cs (1)
145private static RangeHeaderValue? ParseCacheRangeHeaderValue(string value) => RangeHeaderValue.TryParse(value, out var result) ? result : null;
Microsoft.Net.Http.Headers.Tests (5)
RangeHeaderValueTest.cs (2)
165Assert.True(RangeHeaderValue.TryParse(input, out var result)); 171Assert.False(RangeHeaderValue.TryParse(input, out var result));
RangeItemHeaderValueTest.cs (3)
125Assert.False(RangeHeaderValue.TryParse("byte=" + input, out result)); 131Assert.True(RangeHeaderValue.TryParse("byte=" + input, out result), input); 145Assert.True(RangeHeaderValue.TryParse("byte=" + input, out result), input);