-Added netstandard1.1 with BigInteger support
This commit is contained in:
@@ -18,6 +18,31 @@
|
||||
<group targetFramework=".NETFramework2.0" />
|
||||
<group targetFramework=".NETPortable4.5-Profile259" />
|
||||
<group targetFramework=".NETPortable4.0-Profile328" />
|
||||
<group targetFramework=".NETStandard1.1">
|
||||
<dependency id="Microsoft.CSharp" version="4.0.1" />
|
||||
<dependency id="System.Collections" version="4.0.11" />
|
||||
<dependency id="System.Diagnostics.Debug" version="4.0.11" />
|
||||
<dependency id="System.Dynamic.Runtime" version="4.0.11" />
|
||||
<dependency id="System.Globalization" version="4.0.11" />
|
||||
<dependency id="System.IO" version="4.1.0" />
|
||||
<dependency id="System.Linq" version="4.1.0" />
|
||||
<dependency id="System.Linq.Expressions" version="4.1.0" />
|
||||
<dependency id="System.ObjectModel" version="4.0.12" />
|
||||
<dependency id="System.Reflection" version="4.1.0" />
|
||||
<dependency id="System.Reflection.Extensions" version="4.0.1" />
|
||||
<dependency id="System.Resources.ResourceManager" version="4.0.1" />
|
||||
<dependency id="System.Runtime" version="4.1.0" />
|
||||
<dependency id="System.Runtime.Extensions" version="4.1.0" />
|
||||
<dependency id="System.Runtime.Numerics" version="4.0.1" />
|
||||
<dependency id="System.Runtime.Serialization.Primitives" version="4.1.1" />
|
||||
<dependency id="System.Text.Encoding" version="4.0.11" />
|
||||
<dependency id="System.Text.Encoding.Extensions" version="4.0.11" />
|
||||
<dependency id="System.Text.RegularExpressions" version="4.1.0" />
|
||||
<dependency id="System.Threading" version="4.0.11" />
|
||||
<dependency id="System.Threading.Tasks" version="4.0.11" />
|
||||
<dependency id="System.Xml.ReaderWriter" version="4.0.11" />
|
||||
<dependency id="System.Xml.XDocument" version="4.0.11" />
|
||||
</group>
|
||||
<group targetFramework=".NETStandard1.0">
|
||||
<dependency id="Microsoft.CSharp" version="4.0.1" />
|
||||
<dependency id="System.Collections" version="4.0.11" />
|
||||
|
||||
@@ -30,7 +30,7 @@ using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using Newtonsoft.Json.Tests.TestObjects;
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -1508,7 +1508,7 @@ namespace Newtonsoft.Json.Tests.Bson
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
public class BigIntegerTestClass
|
||||
{
|
||||
public BigInteger Blah { get; set; }
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -800,7 +800,7 @@ namespace Newtonsoft.Json.Tests.Bson
|
||||
Assert.AreEqual(c.AGuid, c2.AGuid.ToString());
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void WriteBigInteger()
|
||||
{
|
||||
|
||||
@@ -2676,7 +2676,7 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
Assert.AreEqual(@"<root><b xmlns=""http://www.example.com/ns"">Asd</b><c>AAA</c><test>adad</test></root>", xmlBack.OuterXml);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void DeserializeBigInteger()
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json.Schema;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Runtime.Serialization;
|
||||
@@ -1202,7 +1202,7 @@ namespace Newtonsoft.Json.Tests
|
||||
writer.Flush();
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void IntegerLengthOverflows()
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json.Linq;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -344,7 +344,7 @@ second line
|
||||
third line", jsonTextReader.Value);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void ReadBigInteger()
|
||||
{
|
||||
@@ -1245,7 +1245,7 @@ third line", jsonTextReader.Value);
|
||||
}
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void ReadInt64Overflow()
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ using System.IO;
|
||||
#if NET20
|
||||
using Newtonsoft.Json.Utilities.LinqBridge;
|
||||
#endif
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -357,7 +357,7 @@ namespace Newtonsoft.Json.Tests
|
||||
Assert.IsNotNull(validationEventArgs);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void IntegerGreaterThanMaximumValue_BigInteger()
|
||||
{
|
||||
@@ -610,7 +610,7 @@ namespace Newtonsoft.Json.Tests
|
||||
Assert.IsNotNull(validationEventArgs);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void BigIntegerDivisibleBy_Success()
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -263,7 +263,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
new JProperty("Uri", new Uri("http://json.codeplex.com/")),
|
||||
new JProperty("Guid", new Guid("EA27FE1D-0D80-44F2-BF34-4654156FA7AF")),
|
||||
new JProperty("TimeSpan", TimeSpan.FromDays(1))
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
, new JProperty("BigInteger", BigInteger.Parse("1"))
|
||||
#endif
|
||||
);
|
||||
@@ -296,7 +296,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(d.Decimal == 1.1m);
|
||||
Assert.IsTrue(d.Decimal != 1.0f);
|
||||
Assert.IsTrue(d.Decimal != 1.0d);
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
Assert.IsTrue(d.Decimal > new BigInteger(0));
|
||||
#endif
|
||||
|
||||
@@ -312,11 +312,11 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(d.Float == 1.1m);
|
||||
Assert.IsTrue(d.Float != 1.0f);
|
||||
Assert.IsTrue(d.Float != 1.0d);
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
Assert.IsTrue(d.Float > new BigInteger(0));
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
Assert.IsTrue(d.BigInteger == d.BigInteger);
|
||||
Assert.IsTrue(d.BigInteger > 0);
|
||||
Assert.IsTrue(d.BigInteger > 0.0m);
|
||||
@@ -372,7 +372,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
new JProperty("Uri", new Uri("http://json.codeplex.com/")),
|
||||
new JProperty("Guid", new Guid("EA27FE1D-0D80-44F2-BF34-4654156FA7AF")),
|
||||
new JProperty("TimeSpan", TimeSpan.FromDays(1))
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
, new JProperty("BigInteger", new BigInteger(100))
|
||||
#endif
|
||||
);
|
||||
@@ -451,7 +451,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
r += 2;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
r = d.BigInteger + null;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
r += 2;
|
||||
@@ -530,7 +530,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
r -= 2;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
r = d.BigInteger - null;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
r -= 2;
|
||||
@@ -604,7 +604,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
r *= 2;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
r = d.BigInteger * 1.1d;
|
||||
Assert.AreEqual(100m, (decimal)r);
|
||||
r *= 2;
|
||||
@@ -678,7 +678,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
r /= 2;
|
||||
Assert.AreEqual(null, r.Value);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
r = d.BigInteger / 1.1d;
|
||||
Assert.AreEqual(100m, (decimal)r);
|
||||
r /= 2;
|
||||
@@ -706,7 +706,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
new JProperty("Uri", new Uri("http://json.codeplex.com/")),
|
||||
new JProperty("Guid", new Guid("EA27FE1D-0D80-44F2-BF34-4654156FA7AF")),
|
||||
new JProperty("TimeSpan", TimeSpan.FromDays(1))
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
, new JProperty("BigInteger", new BigInteger(100))
|
||||
#endif
|
||||
);
|
||||
@@ -723,7 +723,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual("http://json.codeplex.com/", d.Uri.ToString());
|
||||
Assert.AreEqual("ea27fe1d-0d80-44f2-bf34-4654156fa7af", d.Guid.ToString());
|
||||
Assert.AreEqual("1.00:00:00", d.TimeSpan.ToString());
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
Assert.AreEqual("100", d.BigInteger.ToString());
|
||||
#endif
|
||||
}
|
||||
@@ -807,7 +807,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
AssertValueConverted<Guid?>(null);
|
||||
AssertValueConverted<Uri>(new Uri("http://json.codeplex.com/"));
|
||||
AssertValueConverted<Uri>(null);
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
AssertValueConverted<BigInteger>(new BigInteger(100));
|
||||
AssertValueConverted<BigInteger?>(null);
|
||||
#endif
|
||||
|
||||
@@ -39,7 +39,7 @@ using NUnit.Framework;
|
||||
#endif
|
||||
using Newtonsoft.Json;
|
||||
using System.IO;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -51,7 +51,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
[TestFixture]
|
||||
public class JTokenReaderTest : TestFixtureBase
|
||||
{
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void ConvertBigIntegerToDouble()
|
||||
{
|
||||
@@ -876,7 +876,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(1d, reader.ReadAsDouble());
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void ReadAsBoolean_BigInteger_Success()
|
||||
{
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -372,7 +372,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
|
||||
Assert.AreEqual(5, (int)(new JValue(StringComparison.OrdinalIgnoreCase)));
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
string bigIntegerText = "1234567899999999999999999999999999999999999999999999999999999999999990";
|
||||
|
||||
Assert.AreEqual(BigInteger.Parse(bigIntegerText), (new JValue(BigInteger.Parse(bigIntegerText))).Value);
|
||||
@@ -452,7 +452,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
#endif
|
||||
ExceptionAssert.Throws<ArgumentException>(() => { var i = (Uri)new JValue(true); }, "Can not convert Boolean to Uri.");
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
ExceptionAssert.Throws<ArgumentException>(() => { var i = (new JValue(new Uri("http://www.google.com"))).ToObject<BigInteger>(); }, "Can not convert Uri to BigInteger.");
|
||||
ExceptionAssert.Throws<ArgumentException>(() => { var i = (JValue.CreateNull()).ToObject<BigInteger>(); }, "Can not convert Null to BigInteger.");
|
||||
ExceptionAssert.Throws<ArgumentException>(() => { var i = (new JValue(Guid.NewGuid())).ToObject<BigInteger>(); }, "Can not convert Guid to BigInteger.");
|
||||
@@ -469,7 +469,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
[Test]
|
||||
public void ToObject()
|
||||
{
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
Assert.AreEqual((BigInteger)1, (new JValue(1).ToObject(typeof(BigInteger))));
|
||||
Assert.AreEqual((BigInteger)1, (new JValue(1).ToObject(typeof(BigInteger?))));
|
||||
Assert.AreEqual((BigInteger?)null, (JValue.CreateNull().ToObject(typeof(BigInteger?))));
|
||||
@@ -526,7 +526,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue((DateTimeOffset?)null), (JValue)(DateTimeOffset?)null));
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
// had to remove implicit casting to avoid user reference to System.Numerics.dll
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue(new BigInteger(1)), new JValue(new BigInteger(1))));
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue((BigInteger?)null), new JValue((BigInteger?)null)));
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -124,7 +124,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
jsonWriter.WriteValue("DVD read/writer");
|
||||
Assert.AreEqual(WriteState.Array, jsonWriter.WriteState);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
jsonWriter.WriteValue(new BigInteger(123));
|
||||
Assert.AreEqual(WriteState.Array, jsonWriter.WriteState);
|
||||
#endif
|
||||
@@ -176,7 +176,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(WriteState.Array, jsonWriter.WriteState);
|
||||
Assert.AreEqual(a[a.Count - 1], jsonWriter.CurrentToken);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
jsonWriter.WriteValue(new BigInteger(123));
|
||||
Assert.AreEqual(WriteState.Array, jsonWriter.WriteState);
|
||||
Assert.AreEqual(a[a.Count - 1], jsonWriter.CurrentToken);
|
||||
@@ -209,7 +209,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
/*fail*/]", writer.Token.ToString());
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void WriteBigInteger()
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json.Tests.TestObjects;
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -183,7 +183,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(g, v.Value);
|
||||
Assert.AreEqual(JTokenType.Guid, v.Type);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
BigInteger i = BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990");
|
||||
v.Value = i;
|
||||
Assert.AreEqual(i, v.Value);
|
||||
@@ -243,13 +243,13 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
v = new JValue(new Guid("B282ADE7-C520-496C-A448-4084F6803DE5"));
|
||||
Assert.AreEqual("b282ade7-c520-496c-a448-4084f6803de5", v.ToString(null, CultureInfo.InvariantCulture));
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
v = new JValue(BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990"));
|
||||
Assert.AreEqual("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990", v.ToString(null, CultureInfo.InvariantCulture));
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void JValueParse()
|
||||
{
|
||||
@@ -517,7 +517,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(Int32.MaxValue, Convert.ToInt32(new JValue(Int32.MaxValue)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void ConvertsToInt32_BigInteger()
|
||||
{
|
||||
@@ -679,7 +679,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
v = new JValue(new Uri("http://www.google.com"));
|
||||
Assert.AreEqual(TypeCode.Object, v.GetTypeCode());
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
v = new JValue(new BigInteger(3));
|
||||
Assert.AreEqual(TypeCode.Object, v.GetTypeCode());
|
||||
#endif
|
||||
@@ -698,7 +698,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
int i = (int)v.ToType(typeof(int), CultureInfo.InvariantCulture);
|
||||
Assert.AreEqual(9, i);
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
BigInteger bi = (BigInteger)v.ToType(typeof(BigInteger), CultureInfo.InvariantCulture);
|
||||
Assert.AreEqual(new BigInteger(9), bi);
|
||||
#endif
|
||||
@@ -713,7 +713,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual("2013", v.ToString("yyyy"));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void ToStringNewTypes()
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Linq.JsonPath;
|
||||
@@ -652,7 +652,7 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
|
||||
Assert.IsTrue(JToken.DeepEquals(new JObject(new JProperty("hi", 3)), t[1]));
|
||||
}
|
||||
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || DNXCORE50 || PORTABLE40 || NET35 || NET20) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void GreaterQueryBigInteger()
|
||||
{
|
||||
|
||||
@@ -31,8 +31,10 @@ using System.Security;
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
|
||||
#if NETSTANDARD10
|
||||
#if NETSTANDARD1_0
|
||||
[assembly: AssemblyTitle("Json.NET Tests .NET Standard 1.0")]
|
||||
#elif NETSTANDARD1_1
|
||||
[assembly: AssemblyTitle("Json.NET Tests .NET Standard 1.1")]
|
||||
#elif PORTABLE40
|
||||
[assembly: AssemblyTitle("Json.NET Tests Portable .NET 4.0")]
|
||||
#elif PORTABLE
|
||||
|
||||
@@ -29,7 +29,7 @@ using System.ComponentModel;
|
||||
using System.Collections.Concurrent;
|
||||
#endif
|
||||
using System.Collections.Generic;
|
||||
#if !(NET20 || NET35 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
#if !(NET20 || NETFX_CORE || DNXCORE50)
|
||||
@@ -8208,7 +8208,7 @@ Path '', line 1, position 1.");
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || NET40 || PORTABLE40)
|
||||
#if !PORTABLE
|
||||
#if !PORTABLE || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void DeserializeReadOnlyListWithBigInteger()
|
||||
{
|
||||
@@ -8551,7 +8551,7 @@ Path '', line 1, position 1.");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(PORTABLE || NET35 || NET20 || PORTABLE40)
|
||||
#if !(PORTABLE || NET35 || NET20 || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void ReadTooLargeInteger()
|
||||
{
|
||||
@@ -8734,7 +8734,7 @@ Path '', line 1, position 1.");
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void SerializeBigInteger()
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using Newtonsoft.Json.Linq;
|
||||
#if !(NET20 || NET35 || PORTABLE ||PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Runtime.Serialization;
|
||||
@@ -879,7 +879,7 @@ Newtonsoft.Json Error: 0 : Error!
|
||||
Assert.AreEqual(23, deserialized.FavoriteNumber);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
[Test]
|
||||
public void TraceJsonWriterTest()
|
||||
{
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
},*/
|
||||
"netcoreapp1.0": {
|
||||
"buildOptions": {
|
||||
"define": [ "NETSTANDARD10", "DNXCORE50", "PORTABLE" ]
|
||||
"define": [ "NETSTANDARD1_1", "DNXCORE50", "PORTABLE" ]
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
|
||||
@@ -27,7 +27,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -232,7 +232,7 @@ namespace Newtonsoft.Json.Bson
|
||||
/// <param name="value">The <see cref="Object"/> value to write.</param>
|
||||
public override void WriteValue(object value)
|
||||
{
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
if (value is BigInteger)
|
||||
{
|
||||
InternalWriteValue(JsonToken.Integer);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#endregion
|
||||
|
||||
#if !PORTABLE40
|
||||
#if !(PORTABLE || NET20 || NET35)
|
||||
#if !(PORTABLE || NET20 || NET35) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System;
|
||||
@@ -1635,7 +1635,7 @@ namespace Newtonsoft.Json.Converters
|
||||
}
|
||||
else if (reader.TokenType == JsonToken.Integer)
|
||||
{
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
if (reader.Value is BigInteger)
|
||||
{
|
||||
return ((BigInteger)reader.Value).ToString(CultureInfo.InvariantCulture);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Globalization;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
#if !(NET20 || NET35 || PORTABLE40)
|
||||
@@ -238,7 +238,7 @@ namespace Newtonsoft.Json
|
||||
return value.ToString(null, CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
private static string ToStringInternal(BigInteger value)
|
||||
{
|
||||
return value.ToString(null, CultureInfo.InvariantCulture);
|
||||
@@ -510,7 +510,7 @@ namespace Newtonsoft.Json
|
||||
return ToString((Uri)value);
|
||||
case PrimitiveTypeCode.TimeSpan:
|
||||
return ToString((TimeSpan)value);
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
case PrimitiveTypeCode.BigInteger:
|
||||
return ToStringInternal((BigInteger)value);
|
||||
#endif
|
||||
|
||||
@@ -27,7 +27,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Globalization;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Serialization;
|
||||
@@ -623,7 +623,7 @@ namespace Newtonsoft.Json
|
||||
if (!(Value is double))
|
||||
{
|
||||
double d;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (Value is BigInteger)
|
||||
{
|
||||
d = (double)(BigInteger)Value;
|
||||
@@ -683,7 +683,7 @@ namespace Newtonsoft.Json
|
||||
case JsonToken.Integer:
|
||||
case JsonToken.Float:
|
||||
bool b;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (Value is BigInteger)
|
||||
{
|
||||
b = (BigInteger)Value != 0;
|
||||
|
||||
@@ -30,7 +30,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
using System.Globalization;
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Utilities;
|
||||
@@ -747,7 +747,7 @@ namespace Newtonsoft.Json
|
||||
case '9':
|
||||
ParseNumber(ReadType.Read);
|
||||
bool b;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (Value is BigInteger)
|
||||
{
|
||||
b = (BigInteger)Value != 0;
|
||||
@@ -2022,7 +2022,7 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
else if (parseResult == ParseResult.Overflow)
|
||||
{
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
string number = _stringReference.ToString();
|
||||
|
||||
if (number.Length > MaximumJavascriptIntegerCharacterLength)
|
||||
@@ -2076,7 +2076,7 @@ namespace Newtonsoft.Json
|
||||
SetToken(numberType, numberValue, false);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
// By using the BigInteger type in a separate method,
|
||||
// the runtime can execute the ParseNumber even if
|
||||
// the System.Numerics.BigInteger.Parse method is
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -359,7 +359,7 @@ namespace Newtonsoft.Json
|
||||
/// <param name="value">The <see cref="Object"/> value to write.</param>
|
||||
public override void WriteValue(object value)
|
||||
{
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
if (value is BigInteger)
|
||||
{
|
||||
InternalWriteValue(JsonToken.Integer);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Linq;
|
||||
@@ -840,7 +840,7 @@ namespace Newtonsoft.Json
|
||||
if (schema.DivisibleBy != null)
|
||||
{
|
||||
bool notDivisible;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (value is BigInteger)
|
||||
{
|
||||
// not that this will lose any decimal point on DivisibleBy
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Utilities;
|
||||
@@ -532,7 +532,7 @@ namespace Newtonsoft.Json
|
||||
break;
|
||||
case JsonToken.Integer:
|
||||
ValidationUtils.ArgumentNotNull(value, nameof(value));
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
if (value is BigInteger)
|
||||
{
|
||||
WriteValue((BigInteger)value);
|
||||
@@ -1392,7 +1392,7 @@ namespace Newtonsoft.Json
|
||||
}
|
||||
else
|
||||
{
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
// this is here because adding a WriteValue(BigInteger) to JsonWriter will
|
||||
// mean the user has to add a reference to System.Numerics.dll
|
||||
if (value is BigInteger)
|
||||
@@ -1550,7 +1550,7 @@ namespace Newtonsoft.Json
|
||||
case PrimitiveTypeCode.TimeSpanNullable:
|
||||
writer.WriteValue((value == null) ? (TimeSpan?)null : (TimeSpan)value);
|
||||
break;
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20) || NETSTANDARD1_1
|
||||
case PrimitiveTypeCode.BigInteger:
|
||||
// this will call to WriteValue(object)
|
||||
writer.WriteValue((BigInteger)value);
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.Dynamic;
|
||||
using System.Linq.Expressions;
|
||||
#endif
|
||||
using System.IO;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -68,7 +68,7 @@ namespace Newtonsoft.Json.Linq
|
||||
|
||||
private static readonly JTokenType[] BooleanTypes = new[] { JTokenType.Integer, JTokenType.Float, JTokenType.String, JTokenType.Comment, JTokenType.Raw, JTokenType.Boolean };
|
||||
private static readonly JTokenType[] NumberTypes = new[] { JTokenType.Integer, JTokenType.Float, JTokenType.String, JTokenType.Comment, JTokenType.Raw, JTokenType.Boolean };
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
private static readonly JTokenType[] BigIntegerTypes = new[] { JTokenType.Integer, JTokenType.Float, JTokenType.String, JTokenType.Comment, JTokenType.Raw, JTokenType.Boolean, JTokenType.Bytes };
|
||||
#endif
|
||||
private static readonly JTokenType[] StringTypes = new[] { JTokenType.Date, JTokenType.Integer, JTokenType.Float, JTokenType.String, JTokenType.Comment, JTokenType.Raw, JTokenType.Boolean, JTokenType.Bytes, JTokenType.Guid, JTokenType.TimeSpan, JTokenType.Uri };
|
||||
@@ -492,7 +492,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Boolean.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return Convert.ToBoolean((int)(BigInteger)v.Value);
|
||||
@@ -546,7 +546,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Boolean.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return Convert.ToBoolean((int)(BigInteger)v.Value);
|
||||
@@ -569,7 +569,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Int64.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (long)(BigInteger)v.Value;
|
||||
@@ -660,7 +660,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Decimal.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (decimal?)(BigInteger)v.Value;
|
||||
@@ -688,7 +688,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Double.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (double?)(BigInteger)v.Value;
|
||||
@@ -716,7 +716,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Char.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (char?)(BigInteger)v.Value;
|
||||
@@ -739,7 +739,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Int32.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (int)(BigInteger)v.Value;
|
||||
@@ -762,7 +762,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Int16.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (short)(BigInteger)v.Value;
|
||||
@@ -786,7 +786,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to UInt16.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (ushort)(BigInteger)v.Value;
|
||||
@@ -810,7 +810,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Char.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (char)(BigInteger)v.Value;
|
||||
@@ -833,7 +833,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Byte.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (byte)(BigInteger)v.Value;
|
||||
@@ -857,7 +857,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to SByte.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (sbyte)(BigInteger)v.Value;
|
||||
@@ -885,7 +885,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Int32.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (int?)(BigInteger)v.Value;
|
||||
@@ -913,7 +913,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Int16.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (short?)(BigInteger)v.Value;
|
||||
@@ -942,7 +942,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to UInt16.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (ushort?)(BigInteger)v.Value;
|
||||
@@ -970,7 +970,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Byte.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (byte?)(BigInteger)v.Value;
|
||||
@@ -999,7 +999,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to SByte.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (sbyte?)(BigInteger)v.Value;
|
||||
@@ -1050,7 +1050,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Int64.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (long?)(BigInteger)v.Value;
|
||||
@@ -1078,7 +1078,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Single.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (float?)(BigInteger)v.Value;
|
||||
@@ -1101,7 +1101,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Decimal.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (decimal)(BigInteger)v.Value;
|
||||
@@ -1130,7 +1130,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to UInt32.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (uint?)(BigInteger)v.Value;
|
||||
@@ -1159,7 +1159,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to UInt64.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (ulong?)(BigInteger)v.Value;
|
||||
@@ -1182,7 +1182,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Double.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (double)(BigInteger)v.Value;
|
||||
@@ -1205,7 +1205,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to Single.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (float)(BigInteger)v.Value;
|
||||
@@ -1241,7 +1241,7 @@ namespace Newtonsoft.Json.Linq
|
||||
{
|
||||
return Convert.ToBase64String((byte[])v.Value);
|
||||
}
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return ((BigInteger)v.Value).ToString(CultureInfo.InvariantCulture);
|
||||
@@ -1265,7 +1265,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to UInt32.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (uint)(BigInteger)v.Value;
|
||||
@@ -1289,7 +1289,7 @@ namespace Newtonsoft.Json.Linq
|
||||
throw new ArgumentException("Can not convert {0} to UInt64.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return (ulong)(BigInteger)v.Value;
|
||||
@@ -1321,7 +1321,7 @@ namespace Newtonsoft.Json.Linq
|
||||
{
|
||||
return Convert.FromBase64String(Convert.ToString(v.Value, CultureInfo.InvariantCulture));
|
||||
}
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (v.Value is BigInteger)
|
||||
{
|
||||
return ((BigInteger)v.Value).ToByteArray();
|
||||
@@ -1456,7 +1456,7 @@ namespace Newtonsoft.Json.Linq
|
||||
return (v.Value is Uri) ? (Uri)v.Value : new Uri(Convert.ToString(v.Value, CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
private static BigInteger ToBigInteger(JToken value)
|
||||
{
|
||||
JValue v = EnsureValue(value);
|
||||
@@ -2035,7 +2035,7 @@ namespace Newtonsoft.Json.Linq
|
||||
return (TimeSpan?)this;
|
||||
case PrimitiveTypeCode.TimeSpan:
|
||||
return (TimeSpan)this;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
case PrimitiveTypeCode.BigIntegerNullable:
|
||||
return ToBigIntegerNullable(this);
|
||||
case PrimitiveTypeCode.BigInteger:
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using Newtonsoft.Json.Utilities;
|
||||
@@ -221,7 +221,7 @@ namespace Newtonsoft.Json.Linq
|
||||
/// <param name="value">The <see cref="Object"/> value to write.</param>
|
||||
public override void WriteValue(object value)
|
||||
{
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
if (value is BigInteger)
|
||||
{
|
||||
InternalWriteValue(JsonToken.Integer);
|
||||
|
||||
@@ -31,7 +31,7 @@ using System.Globalization;
|
||||
using System.Dynamic;
|
||||
using System.Linq.Expressions;
|
||||
#endif
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
|
||||
#endif
|
||||
@@ -219,7 +219,7 @@ namespace Newtonsoft.Json.Linq
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
private static int CompareBigInteger(BigInteger i1, object i2)
|
||||
{
|
||||
int result = i1.CompareTo(ConvertUtils.ToBigInteger(i2));
|
||||
@@ -264,7 +264,7 @@ namespace Newtonsoft.Json.Linq
|
||||
switch (valueType)
|
||||
{
|
||||
case JTokenType.Integer:
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (objA is BigInteger)
|
||||
{
|
||||
return CompareBigInteger((BigInteger)objA, objB);
|
||||
@@ -287,7 +287,7 @@ namespace Newtonsoft.Json.Linq
|
||||
return Convert.ToInt64(objA, CultureInfo.InvariantCulture).CompareTo(Convert.ToInt64(objB, CultureInfo.InvariantCulture));
|
||||
}
|
||||
case JTokenType.Float:
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (objA is BigInteger)
|
||||
{
|
||||
return CompareBigInteger((BigInteger)objA, objB);
|
||||
@@ -428,7 +428,7 @@ namespace Newtonsoft.Json.Linq
|
||||
}
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (objA is BigInteger || objB is BigInteger)
|
||||
{
|
||||
if (objA == null || objB == null)
|
||||
@@ -632,7 +632,7 @@ namespace Newtonsoft.Json.Linq
|
||||
{
|
||||
return JTokenType.Integer;
|
||||
}
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
else if (value is BigInteger)
|
||||
{
|
||||
return JTokenType.Integer;
|
||||
@@ -768,7 +768,7 @@ namespace Newtonsoft.Json.Linq
|
||||
{
|
||||
writer.WriteValue((ulong)_value);
|
||||
}
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
else if (_value is BigInteger)
|
||||
{
|
||||
writer.WriteValue((BigInteger)_value);
|
||||
|
||||
@@ -32,8 +32,10 @@ using System.Security;
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
#if NETSTANDARD10
|
||||
#if NETSTANDARD1_0
|
||||
[assembly: AssemblyTitle("Json.NET .NET Standard 1.0")]
|
||||
#elif NETSTANDARD1_1
|
||||
[assembly: AssemblyTitle("Json.NET .NET Standard 1.1")]
|
||||
#elif PORTABLE40
|
||||
[assembly: AssemblyTitle("Json.NET Portable .NET 4.0")]
|
||||
#elif PORTABLE
|
||||
|
||||
@@ -487,7 +487,7 @@ namespace Newtonsoft.Json.Schema
|
||||
case PrimitiveTypeCode.UInt32:
|
||||
case PrimitiveTypeCode.Int64:
|
||||
case PrimitiveTypeCode.UInt64:
|
||||
#if !(PORTABLE || NET35 || NET20)
|
||||
#if !(PORTABLE || NET35 || NET20) || NETSTANDARD1_1
|
||||
case PrimitiveTypeCode.BigInteger:
|
||||
#endif
|
||||
return schemaType | JsonSchemaType.Integer;
|
||||
|
||||
@@ -33,7 +33,7 @@ using System.Dynamic;
|
||||
#endif
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Reflection;
|
||||
@@ -966,7 +966,7 @@ namespace Newtonsoft.Json.Serialization
|
||||
}
|
||||
}
|
||||
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20) || NETSTANDARD1_1
|
||||
if (value is BigInteger)
|
||||
{
|
||||
return ConvertUtils.FromBigInteger((BigInteger)value, contract.NonNullableUnderlyingType);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -139,7 +139,7 @@ namespace Newtonsoft.Json.Serialization
|
||||
|
||||
public override void WriteValue(object value)
|
||||
{
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
if (value is BigInteger)
|
||||
{
|
||||
_textWriter.WriteValue(value);
|
||||
|
||||
@@ -27,7 +27,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.ComponentModel;
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Text;
|
||||
@@ -145,7 +145,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
{ typeof(Guid?), PrimitiveTypeCode.GuidNullable },
|
||||
{ typeof(TimeSpan), PrimitiveTypeCode.TimeSpan },
|
||||
{ typeof(TimeSpan?), PrimitiveTypeCode.TimeSpanNullable },
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20) || NETSTANDARD1_1
|
||||
{ typeof(BigInteger), PrimitiveTypeCode.BigInteger },
|
||||
{ typeof(BigInteger?), PrimitiveTypeCode.BigIntegerNullable },
|
||||
#endif
|
||||
@@ -311,7 +311,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
return o => call(null, o);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
|
||||
#if !(NET20 || NET35 || PORTABLE || PORTABLE40) || NETSTANDARD1_1
|
||||
internal static BigInteger ToBigInteger(object value)
|
||||
{
|
||||
if (value is BigInteger)
|
||||
@@ -540,7 +540,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
}
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
|
||||
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE) || NETSTANDARD1_1
|
||||
if (targetType == typeof(BigInteger))
|
||||
{
|
||||
value = ToBigInteger(initialValue);
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20) || NETSTANDARD1_1
|
||||
using System.Numerics;
|
||||
#endif
|
||||
using System.Reflection;
|
||||
@@ -1105,7 +1105,7 @@ namespace Newtonsoft.Json.Utilities
|
||||
return 0m;
|
||||
case PrimitiveTypeCode.DateTime:
|
||||
return new DateTime();
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
|
||||
#if !(PORTABLE || PORTABLE40 || NET35 || NET20) || NETSTANDARD1_1
|
||||
case PrimitiveTypeCode.BigInteger:
|
||||
return new BigInteger();
|
||||
#endif
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
"netstandard1.0": {
|
||||
"buildOptions": {
|
||||
"define": [
|
||||
"NETSTANDARD10",
|
||||
"NETSTANDARD1_0",
|
||||
"PORTABLE"
|
||||
]
|
||||
},
|
||||
@@ -129,6 +129,39 @@
|
||||
"System.Xml.ReaderWriter": "4.0.11",
|
||||
"System.Xml.XDocument": "4.0.11"
|
||||
}
|
||||
},
|
||||
"netstandard1.1": {
|
||||
"buildOptions": {
|
||||
"define": [
|
||||
"NETSTANDARD1_1",
|
||||
"PORTABLE"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.CSharp": "4.0.1",
|
||||
"System.Collections": "4.0.11",
|
||||
"System.Diagnostics.Debug": "4.0.11",
|
||||
"System.Dynamic.Runtime": "4.0.11",
|
||||
"System.Globalization": "4.0.11",
|
||||
"System.IO": "4.1.0",
|
||||
"System.Linq": "4.1.0",
|
||||
"System.Linq.Expressions": "4.1.0",
|
||||
"System.ObjectModel": "4.0.12",
|
||||
"System.Reflection": "4.1.0",
|
||||
"System.Reflection.Extensions": "4.0.1",
|
||||
"System.Resources.ResourceManager": "4.0.1",
|
||||
"System.Runtime": "4.1.0",
|
||||
"System.Runtime.Extensions": "4.1.0",
|
||||
"System.Runtime.Numerics": "4.0.1",
|
||||
"System.Runtime.Serialization.Primitives": "4.1.1",
|
||||
"System.Text.Encoding": "4.0.11",
|
||||
"System.Text.Encoding.Extensions": "4.0.11",
|
||||
"System.Text.RegularExpressions": "4.1.0",
|
||||
"System.Threading": "4.0.11",
|
||||
"System.Threading.Tasks": "4.0.11",
|
||||
"System.Xml.ReaderWriter": "4.0.11",
|
||||
"System.Xml.XDocument": "4.0.11"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user