176 if (tokenLength == 0)
183 if (whitespaceLength == 0)
187 num += whitespaceLength;
188 if (num ==
input.Length)
192 int fromStartIndex = num;
194 int toStartIndex = 0;
206 if (num ==
input.Length)
210 int lengthStartIndex = num;
211 int lengthLength = 0;
216 if (!
TryCreateContentRange(
input, unit, fromStartIndex, fromLength, toStartIndex, toLength, lengthStartIndex, lengthLength, out parsedValue))
283 private static bool TryCreateContentRange(
string input,
string unit,
int fromStartIndex,
int fromLength,
int toStartIndex,
int toLength,
int lengthStartIndex,
int lengthLength, [NotNullWhen(
true)] out
object parsedValue)
296 if (fromLength > 0 && toLength > 0 && result > result2)
305 if (toLength > 0 && lengthLength > 0 && result2 >= result3)
310 contentRangeHeaderValue._unit = unit;
313 contentRangeHeaderValue._from = result;
314 contentRangeHeaderValue._to = result2;
316 if (lengthLength > 0)
318 contentRangeHeaderValue._length = result3;
320 parsedValue = contentRangeHeaderValue;