-Added IJsonBufferPool, performance stuff

This commit is contained in:
James Newton-King
2015-11-12 22:08:39 +13:00
parent d91e8f4425
commit ac1a46bd14
19 changed files with 425 additions and 70 deletions
+33 -3
View File
@@ -173,7 +173,15 @@ namespace Newtonsoft.Json
public DateTimeZoneHandling DateTimeZoneHandling
{
get { return _dateTimeZoneHandling; }
set { _dateTimeZoneHandling = value; }
set
{
if (value < DateTimeZoneHandling.Local || value > DateTimeZoneHandling.RoundtripKind)
{
throw new ArgumentOutOfRangeException("value");
}
_dateTimeZoneHandling = value;
}
}
/// <summary>
@@ -182,7 +190,21 @@ namespace Newtonsoft.Json
public DateParseHandling DateParseHandling
{
get { return _dateParseHandling; }
set { _dateParseHandling = value; }
set
{
if (value < DateParseHandling.None ||
#if !NET20
value > DateParseHandling.DateTimeOffset
#else
value > DateParseHandling.DateTime
#endif
)
{
throw new ArgumentOutOfRangeException("value");
}
_dateParseHandling = value;
}
}
/// <summary>
@@ -191,7 +213,15 @@ namespace Newtonsoft.Json
public FloatParseHandling FloatParseHandling
{
get { return _floatParseHandling; }
set { _floatParseHandling = value; }
set
{
if (value < FloatParseHandling.Double || value > FloatParseHandling.Decimal)
{
throw new ArgumentOutOfRangeException("value");
}
_floatParseHandling = value;
}
}
/// <summary>