From 7e29a7e4899903be4196a6e30a6ecffd033820a9 Mon Sep 17 00:00:00 2001 From: James Newton-King Date: Sat, 6 Sep 2014 15:53:38 +1200 Subject: [PATCH] -Fixed build --- .../Newtonsoft.Json.Tests.WinRT.csproj | 5 +++++ .../LateboundReflectionDelegateFactoryTests.cs | 6 ++++++ Src/Newtonsoft.Json/JsonTextReader.cs | 11 ++--------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj index 6812f788..21a64178 100644 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj +++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WinRT.csproj @@ -121,10 +121,12 @@ + + @@ -213,6 +215,7 @@ + @@ -302,6 +305,7 @@ + @@ -327,6 +331,7 @@ + diff --git a/Src/Newtonsoft.Json.Tests/Utilities/LateboundReflectionDelegateFactoryTests.cs b/Src/Newtonsoft.Json.Tests/Utilities/LateboundReflectionDelegateFactoryTests.cs index ef61adc0..4de05219 100644 --- a/Src/Newtonsoft.Json.Tests/Utilities/LateboundReflectionDelegateFactoryTests.cs +++ b/Src/Newtonsoft.Json.Tests/Utilities/LateboundReflectionDelegateFactoryTests.cs @@ -1,6 +1,12 @@ using System.Reflection; using Newtonsoft.Json.Utilities; +#if !NETFX_CORE using NUnit.Framework; +#else +using Microsoft.VisualStudio.TestPlatform.UnitTestFramework; +using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute; +using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute; +#endif #if NET20 using Newtonsoft.Json.Utilities.LinqBridge; #else diff --git a/Src/Newtonsoft.Json/JsonTextReader.cs b/Src/Newtonsoft.Json/JsonTextReader.cs index 1c5786ca..b56b72bc 100644 --- a/Src/Newtonsoft.Json/JsonTextReader.cs +++ b/Src/Newtonsoft.Json/JsonTextReader.cs @@ -1298,15 +1298,8 @@ namespace Newtonsoft.Json if (number.Length > MaximumJavascriptIntegerCharacterLength) throw JsonReaderException.Create(this, "JSON integer {0} is too large to parse.".FormatWith(CultureInfo.InvariantCulture, _stringReference.ToString())); - try - { - numberValue = BigIntegerParse(number, CultureInfo.InvariantCulture); - numberType = JsonToken.Integer; - } - catch (MissingMethodException) - { - throw JsonReaderException.Create(this, "JSON integer {0} is too large or small for an Int64, and your runtime does not support BigInteger.".FormatWith(CultureInfo.InvariantCulture, _stringReference.ToString())); - } + numberValue = BigIntegerParse(number, CultureInfo.InvariantCulture); + numberType = JsonToken.Integer; #else throw JsonReaderException.Create(this, "JSON integer {0} is too large or small for an Int64.".FormatWith(CultureInfo.InvariantCulture, _stringReference.ToString())); #endif