private object ParseNumberNegativeInfinity(ReadType readType)
{
if (MatchValueWithTrailingSeparator(JsonConvert.NegativeInfinity))
{
switch (readType)
{
case ReadType.Read:
case ReadType.ReadAsDouble:
if (_floatParseHandling == FloatParseHandling.Double)
{
SetToken(JsonToken.Float, double.NegativeInfinity);
return double.NegativeInfinity;
}
break;
case ReadType.ReadAsString:
SetToken(JsonToken.String, JsonConvert.NegativeInfinity);
return JsonConvert.NegativeInfinity;
}
throw JsonReaderException.Create(this, "Cannot read -Infinity value.");
}
throw JsonReaderException.Create(this, "Error parsing -Infinity value.");
}