-Changed DateTimeOffset JValue to return TypeCode.Object
-Incremented version to 8.0.1-beta1
This commit is contained in:
@@ -114,13 +114,21 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Stopwatch sw = new Stopwatch();
|
||||
sw.Start();
|
||||
|
||||
int count = 0;
|
||||
foreach (dynamic o in d)
|
||||
{
|
||||
if (count > 10)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
foreach (dynamic friend in o.friends)
|
||||
{
|
||||
UpdateValueCount(counts, friend.id);
|
||||
UpdateValueCount(counts, ((string) friend.name).Split(' ')[0]);
|
||||
}
|
||||
|
||||
count++;
|
||||
}
|
||||
|
||||
Console.WriteLine("Time (secs): " + sw.Elapsed.TotalSeconds);
|
||||
|
||||
@@ -658,6 +658,11 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
v = new JValue(new BigInteger(3));
|
||||
Assert.AreEqual(TypeCode.Object, v.GetTypeCode());
|
||||
#endif
|
||||
|
||||
#if !(NET20)
|
||||
v = new JValue(new DateTimeOffset(2000, 12, 12, 12, 12, 12, TimeSpan.Zero));
|
||||
Assert.AreEqual(TypeCode.Object, v.GetTypeCode());
|
||||
#endif
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
||||
@@ -973,15 +973,6 @@ namespace Newtonsoft.Json.Linq
|
||||
if (_value == null)
|
||||
return TypeCode.Empty;
|
||||
|
||||
#if !NET20
|
||||
if (_value is DateTimeOffset)
|
||||
return TypeCode.DateTime;
|
||||
#endif
|
||||
#if !(NET20 || NET35 || PORTABLE40)
|
||||
if (_value is BigInteger)
|
||||
return TypeCode.Object;
|
||||
#endif
|
||||
|
||||
IConvertible convertable = _value as IConvertible;
|
||||
|
||||
if (convertable == null)
|
||||
|
||||
Reference in New Issue
Block a user