-Renamed aspnetcore50 to dnxcore50

-Documentation
This commit is contained in:
James Newton-King
2015-04-04 16:13:37 +13:00
parent a5865a9fb5
commit 0552affb83
111 changed files with 293 additions and 309 deletions
+2 -2
View File
@@ -21,9 +21,9 @@
$workingDir = "$baseDir\$workingName"
$builds = @(
@{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; TestsFunction = "NUnitTests"; Constants=""; FinalDir="Net45"; NuGetDir = "net45"; Framework="net-4.0"; Sign=$true},
@{Name = "Newtonsoft.Json.Portable"; TestsName = "Newtonsoft.Json.Tests.Portable"; TestsFunction = "NUnitTests"; Constants="PORTABLE"; FinalDir="Portable"; NuGetDir = "portable-net45+wp80+win8+wpa81+aspnetcore50"; Framework="net-4.0"; Sign=$true},
@{Name = "Newtonsoft.Json.Portable"; TestsName = "Newtonsoft.Json.Tests.Portable"; TestsFunction = "NUnitTests"; Constants="PORTABLE"; FinalDir="Portable"; NuGetDir = "portable-net45+wp80+win8+wpa81+dnxcore50"; Framework="net-4.0"; Sign=$true},
@{Name = "Newtonsoft.Json.Portable40"; TestsName = "Newtonsoft.Json.Tests.Portable40"; TestsFunction = "NUnitTests"; Constants="PORTABLE40"; FinalDir="Portable40"; NuGetDir = "portable-net40+sl5+wp80+win8+wpa81"; Framework="net-4.0"; Sign=$true},
#@{Name = $null; TestsName = "Newtonsoft.Json.Tests.AspNetCore50"; TestsFunction = "CoreClrTests"; Constants="ASPNETCORE50"; FinalDir="ASPNETCORE50"; NuGetDir = $null; Framework=$null; Sign=$null},
#@{Name = $null; TestsName = "Newtonsoft.Json.Tests.DnxCore50"; TestsFunction = "CoreClrTests"; Constants="DNXCORE50"; FinalDir="DNXCORE50"; NuGetDir = $null; Framework=$null; Sign=$null},
@{Name = "Newtonsoft.Json.Net40"; TestsName = "Newtonsoft.Json.Tests.Net40"; TestsFunction = "NUnitTests"; Constants="NET40"; FinalDir="Net40"; NuGetDir = "net40"; Framework="net-4.0"; Sign=$true},
@{Name = "Newtonsoft.Json.Net35"; TestsName = "Newtonsoft.Json.Tests.Net35"; TestsFunction = "NUnitTests"; Constants="NET35"; FinalDir="Net35"; NuGetDir = "net35"; Framework="net-2.0"; Sign=$true},
@{Name = "Newtonsoft.Json.Net20"; TestsName = "Newtonsoft.Json.Tests.Net20"; TestsFunction = "NUnitTests"; Constants="NET20"; FinalDir="Net20"; NuGetDir = "net20"; Framework="net-2.0"; Sign=$true}
+9 -25
View File
@@ -1,19 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="SerializationAttributes" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<!--
<summary>
<para>Optional summary abstract</para>
</summary>
-->
<introduction>
<!-- Uncomment this to generate an outline of the section and sub-section
titles. Specify a numeric value as the inner text to limit it to
a specific number of sub-topics when creating the outline. Specify
zero (0) to limit it to top-level sections only. -->
<!-- <autoOutline /> -->
<para>Attributes can be used to control how Json.NET serializes and deserializes .NET objects.</para>
<list class="bullet">
<listItem><para><codeEntityReference>T:Newtonsoft.Json.JsonObjectAttribute</codeEntityReference> - Placed on classes to control how they should be serialized as a JSON object.</para></listItem>
<listItem><para><codeEntityReference>T:Newtonsoft.Json.JsonArrayAttribute</codeEntityReference> - Placed on collections to control how they should be serialized as a JSON array.</para></listItem>
@@ -28,8 +19,6 @@
<section>
<title>Standard .NET Serialization Attributes</title>
<content>
<!-- Uncomment this to create a sub-section outline
<autoOutline /> -->
<para>As well as using the built-in Json.NET attributes, Json.NET also looks for the <codeEntityReference>T:System.SerializableAttribute</codeEntityReference>
(if IgnoreSerializableAttribute on DefaultContractResolver is set to false)
<codeEntityReference>T:System.Runtime.Serialization.DataContractAttribute</codeEntityReference>,
@@ -37,7 +26,6 @@
and <codeEntityReference>T:System.NonSerializedAttribute</codeEntityReference> and attributes when determining how JSON is to be serialized and deserialized.
</para>
<alert class="note">
<para>Json.NET attributes take precedence over standard .NET serialization attributes (e.g. if both JsonPropertyAttribute
and DataMemberAttribute are present on a property and both customize the name,
@@ -55,8 +43,6 @@
<section>
<title>JsonObjectAttribute</title>
<content>
<!-- Uncomment this to create a sub-section outline
<autoOutline /> -->
<para>The MemberSerialization flag on this attribute specifies whether member serialization is opt-in
(a member must have the JsonProperty or DataMember attribute to be serialized), opt-out (everything is
serialized by default but can be ignored with the JsonIgnoreAttribute, Json.NET's default behavior) or
@@ -72,8 +58,6 @@
<section>
<title>JsonArrayAttribute/JsonDictionaryAttribute</title>
<content>
<!-- Uncomment this to create a sub-section outline
<autoOutline /> -->
<para>The JsonArrayAttribute and JsonDictionaryAttributes are used to specify whether a class is serialized as that collection type.</para>
<para>The collection attributes have options to customize the JsonConverter, type name handling, and reference handling that are applied to collection items.</para>
</content>
@@ -82,8 +66,6 @@
<section>
<title>JsonPropertyAttribute</title>
<content>
<!-- Uncomment this to create a sub-section outline
<autoOutline /> -->
<para>JsonPropertyAttribute has a number of uses:</para>
<list class="bullet">
@@ -110,9 +92,8 @@
<section>
<title>JsonConverterAttribute</title>
<content>
<!-- Uncomment this to create a sub-section outline
<autoOutline /> -->
<para>The JsonConverterAttribute specifies which JsonSerializer is used to convert an object.</para>
<para>The <codeEntityReference>T:Newtonsoft.Json.JsonConverterAttribute</codeEntityReference> specifies which
<codeEntityReference>T:Newtonsoft.Json.JsonConverter</codeEntityReference> is used to convert an object.</para>
<para>The attribute can be placed on a class or a member. When placed on a class, the JsonConverter
specified by the attribute will be the default way of serializing that class. When the attribute is
on a field or property, then the specified JsonConverter will always be used to serialize that value.</para>
@@ -135,8 +116,10 @@
<section>
<title>JsonExtensionDataAttribute</title>
<content>
<para>Instructs the <codeEntityReference>T:Newtonsoft.Json.JsonSerializer</codeEntityReference> to deserialize properties with no matching class member
into the specified collection and write values during serialization.</para>
<para>The <codeEntityReference>T:Newtonsoft.Json.JsonExtensionDataAttribute</codeEntityReference> instructs the
<codeEntityReference>T:Newtonsoft.Json.JsonSerializer</codeEntityReference> to deserialize properties with no matching field or property
on the type into the specified collection. During serialization the values in this collection are written back to the instance's JSON object.</para>
<para>This example shows the JsonExtensionDataAttribute being applied to a field, unmatched JSON properties being added to the field's collection during deserialization.</para>
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Serializer\DeserializeExtensionData.cs" region="Types" title="Types" />
<code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\Samples\Serializer\DeserializeExtensionData.cs" region="Usage" title="Usage" />
</content>
@@ -150,6 +133,7 @@
<codeEntityReference>T:Newtonsoft.Json.JsonDictionaryAttribute</codeEntityReference>
<codeEntityReference>T:Newtonsoft.Json.JsonPropertyAttribute</codeEntityReference>
<codeEntityReference>T:Newtonsoft.Json.JsonConverterAttribute</codeEntityReference>
<codeEntityReference>T:Newtonsoft.Json.JsonExtensionDataAttribute</codeEntityReference>
</relatedTopics>
</developerConceptualDocument>
</topic>
+1 -1
View File
@@ -153,7 +153,7 @@
<Topic id="ca145ed0-f377-4f1c-9479-d1629082fc6e" visible="True" noFile="true" isExpanded="true" title="Reading and Writing JSON">
<Topic id="ReadJsonWithJsonTextReader" visible="True" title="Read JSON with JsonTextReader" />
<Topic id="WriteJsonWithJsonTextWriter" visible="True" title="Write JSON with JsonTextWriter" />
<Topic id="ReadMultipleContentWithJsonReader" visible="True" isSelected="true" title="Read Multiple Content With JsonReader" />
<Topic id="ReadMultipleContentWithJsonReader" visible="True" isSelected="true" title="Read Multiple Fragments With JsonReader" />
<Topic id="CustomJsonReader" visible="True" title="Custom JsonReader" />
<Topic id="CustomJsonWriter" visible="True" title="Custom JsonWriter" />
</Topic>
@@ -30,7 +30,7 @@ using System.Reflection;
using System.Runtime.Serialization;
using Newtonsoft.Json.Serialization;
using Newtonsoft.Json.Tests.TestObjects;
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
using System.Numerics;
#endif
using System.Text;
@@ -39,7 +39,7 @@ using System.Text.RegularExpressions;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -1506,7 +1506,7 @@ namespace Newtonsoft.Json.Tests.Bson
}
#endif
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
public class BigIntegerTestClass
{
public BigInteger Blah { get; set; }
@@ -25,7 +25,7 @@
using System;
using System.Collections.Generic;
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
using System.Numerics;
#endif
using System.Text;
@@ -34,7 +34,7 @@ using System.Text.RegularExpressions;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -803,7 +803,7 @@ namespace Newtonsoft.Json.Tests.Bson
Assert.AreEqual(c.AGuid, c2.AGuid.ToString());
}
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void WriteBigInteger()
{
@@ -25,10 +25,10 @@
using System;
using System.Collections.Generic;
#if !(NET20 || NETFX_CORE || ASPNETCORE50)
#if !(NET20 || NETFX_CORE || DNXCORE50)
using System.Data.Linq;
#endif
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
using System.Data.SqlTypes;
#endif
using System.Text;
@@ -37,7 +37,7 @@ using Newtonsoft.Json.Converters;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -58,7 +58,7 @@ namespace Newtonsoft.Json.Tests.Converters
public byte[] NullByteArray { get; set; }
}
#if !(NET20 || NETFX_CORE || PORTABLE || PORTABLE40 || ASPNETCORE50)
#if !(NET20 || NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50)
[Test]
public void DeserializeBinaryClass()
{
@@ -124,7 +124,7 @@ namespace Newtonsoft.Json.Tests.Converters
}", json);
}
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50)
public class SqlBinaryClass
{
public SqlBinary SqlBinary { get; set; }
@@ -30,7 +30,7 @@ using Newtonsoft.Json.Converters;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,14 +23,14 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
using System;
using Newtonsoft.Json.Converters;
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -27,14 +27,14 @@ using System.IO;
using System.Text;
using Newtonsoft.Json.Bson;
using Newtonsoft.Json.Linq;
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
using System;
using System.Collections.Generic;
#if NETFX_CORE
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || NETFX_CORE || ASPNETCORE50)
#if !(NET35 || NET20 || NETFX_CORE || DNXCORE50)
using System.Diagnostics;
using System.Reflection;
using Microsoft.FSharp.Core;
@@ -34,7 +34,7 @@ using Newtonsoft.Json.Converters;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -29,7 +29,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -126,7 +126,7 @@ namespace Newtonsoft.Json.Tests.Converters
Assert.AreEqual(2006, d.Year);
}
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
[Test]
public void SerializeFormattedDateTimeNewZealandCulture()
{
@@ -29,7 +29,7 @@ using System.Collections.Generic;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -7,7 +7,7 @@ using Newtonsoft.Json.Serialization;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -30,7 +30,7 @@ using Newtonsoft.Json.Utilities;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -35,7 +35,7 @@ using Newtonsoft.Json.Utilities;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -35,7 +35,7 @@ using Newtonsoft.Json.Converters;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -29,7 +29,7 @@ using Newtonsoft.Json.Converters;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -29,7 +29,7 @@ using Newtonsoft.Json.Utilities.LinqBridge;
using System.Linq;
#endif
using System.Text;
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Tests.Serialization;
@@ -38,7 +38,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
+1 -1
View File
@@ -36,7 +36,7 @@ using Newtonsoft.Json.Serialization;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || PORTABLE || ASPNETCORE50)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50)
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -41,7 +41,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || PORTABLE || ASPNETCORE50)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50)
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -39,7 +39,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || PORTABLE || ASPNETCORE50)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50)
#pragma warning disable 618
using System;
using System.Collections.Generic;
@@ -39,7 +39,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || PORTABLE || ASPNETCORE50)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50)
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -38,7 +38,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || PORTABLE || ASPNETCORE50)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50)
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -40,7 +40,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || PORTABLE || ASPNETCORE50)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50)
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -38,7 +38,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -34,7 +34,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -33,7 +33,7 @@ using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || PORTABLE || ASPNETCORE50)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50)
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -38,7 +38,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || PORTABLE || ASPNETCORE50)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50)
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -42,7 +42,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
+1 -1
View File
@@ -29,7 +29,7 @@ using Newtonsoft.Json.Schema;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -27,7 +27,7 @@
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
+4 -4
View File
@@ -28,7 +28,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.IO;
using Newtonsoft.Json.Schema;
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || DNXCORE50)
using System.Numerics;
#endif
using System.Runtime.Serialization;
@@ -47,7 +47,7 @@ using Newtonsoft.Json.Utilities;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -539,7 +539,7 @@ namespace Newtonsoft.Json.Tests
value = null;
Assert.AreEqual("null", JsonConvert.ToString(value));
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
value = DBNull.Value;
Assert.AreEqual("null", JsonConvert.ToString(value));
#endif
@@ -1132,7 +1132,7 @@ namespace Newtonsoft.Json.Tests
}
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || DNXCORE50)
[Test]
public void IntegerLengthOverflows()
{
@@ -27,7 +27,7 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json.Linq;
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || DNXCORE50)
using System.Numerics;
#endif
using System.Text;
@@ -35,7 +35,7 @@ using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -82,7 +82,7 @@ second line
third line", jsonTextReader.Value);
}
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || DNXCORE50)
[Test]
public void ReadBigInteger()
{
@@ -961,7 +961,7 @@ third line", jsonTextReader.Value);
}
}
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || DNXCORE50)
[Test]
public void ReadInt64Overflow()
{
@@ -3172,7 +3172,7 @@ null//comment
{
string json = @"{
""frameworks"": {
""aspnetcore50"": {
""dnxcore50"": {
""dependencies"": {
""System.Xml.ReaderWriter"": {
""source"": !!! !!!
@@ -3190,7 +3190,7 @@ null//comment
{
}
},
"Unexpected character encountered while parsing value: !. Path 'frameworks.aspnetcore50.dependencies.['System.Xml.ReaderWriter'].source', line 6, position 21.");
"Unexpected character encountered while parsing value: !. Path 'frameworks.dnxcore50.dependencies.['System.Xml.ReaderWriter'].source', line 6, position 21.");
}
}
@@ -40,7 +40,7 @@ using System.Xml;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -121,7 +121,7 @@ namespace Newtonsoft.Json.Tests
Assert.IsTrue(ms.CanRead);
}
#if !(PORTABLE || ASPNETCORE50 || NETFX_CORE)
#if !(PORTABLE || DNXCORE50 || NETFX_CORE)
[Test]
public void WriteIConvertable()
{
@@ -1552,7 +1552,7 @@ null//comment
}
}
#if !(PORTABLE || ASPNETCORE50 || NETFX_CORE)
#if !(PORTABLE || DNXCORE50 || NETFX_CORE)
public struct ConvertibleInt : IConvertible
{
private readonly int _value;
@@ -30,7 +30,7 @@ using System.IO;
#if NET20
using Newtonsoft.Json.Utilities.LinqBridge;
#endif
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
using System.Numerics;
#endif
using System.Text;
@@ -38,7 +38,7 @@ using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -357,7 +357,7 @@ namespace Newtonsoft.Json.Tests
Assert.IsNotNull(validationEventArgs);
}
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void IntegerGreaterThanMaximumValue_BigInteger()
{
@@ -610,7 +610,7 @@ namespace Newtonsoft.Json.Tests
Assert.IsNotNull(validationEventArgs);
}
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void BigIntegerDivisibleBy_Success()
{
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50)
using NUnit.Framework;
using System.Web.UI;
using Newtonsoft.Json.Linq;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50)
using NUnit.Framework;
using Newtonsoft.Json.Linq;
+14 -14
View File
@@ -29,7 +29,7 @@ using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
using System.Numerics;
#endif
using System.Text;
@@ -38,7 +38,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -226,7 +226,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 || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
, new JProperty("BigInteger", BigInteger.Parse("1"))
#endif
);
@@ -259,7 +259,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 || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
Assert.IsTrue(d.Decimal > new BigInteger(0));
#endif
@@ -275,11 +275,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 || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
Assert.IsTrue(d.Float > new BigInteger(0));
#endif
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
Assert.IsTrue(d.BigInteger == d.BigInteger);
Assert.IsTrue(d.BigInteger > 0);
Assert.IsTrue(d.BigInteger > 0.0m);
@@ -335,7 +335,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 || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
, new JProperty("BigInteger", new BigInteger(100))
#endif
);
@@ -414,7 +414,7 @@ namespace Newtonsoft.Json.Tests.Linq
r += 2;
Assert.AreEqual(null, r.Value);
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
r = d.BigInteger + null;
Assert.AreEqual(null, r.Value);
r += 2;
@@ -493,7 +493,7 @@ namespace Newtonsoft.Json.Tests.Linq
r -= 2;
Assert.AreEqual(null, r.Value);
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
r = d.BigInteger - null;
Assert.AreEqual(null, r.Value);
r -= 2;
@@ -567,7 +567,7 @@ namespace Newtonsoft.Json.Tests.Linq
r *= 2;
Assert.AreEqual(null, r.Value);
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
r = d.BigInteger * 1.1d;
Assert.AreEqual(100m, (decimal)r);
r *= 2;
@@ -641,7 +641,7 @@ namespace Newtonsoft.Json.Tests.Linq
r /= 2;
Assert.AreEqual(null, r.Value);
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
r = d.BigInteger / 1.1d;
Assert.AreEqual(100m, (decimal)r);
r /= 2;
@@ -669,7 +669,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 || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
, new JProperty("BigInteger", new BigInteger(100))
#endif
);
@@ -686,7 +686,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 || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
Assert.AreEqual("100", d.BigInteger.ToString());
#endif
}
@@ -770,7 +770,7 @@ namespace Newtonsoft.Json.Tests.Linq
AssertValueConverted<Guid?>(null);
AssertValueConverted<Uri>(new Uri("http://json.codeplex.com/"));
AssertValueConverted<Uri>(null);
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
AssertValueConverted<BigInteger>(new BigInteger(100));
AssertValueConverted<BigInteger?>(null);
#endif
@@ -30,7 +30,7 @@ using System.ComponentModel;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -436,7 +436,7 @@ Parameter name: index");
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void ITypedListGetItemProperties()
{
@@ -30,7 +30,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -27,7 +27,7 @@ using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
using System.Numerics;
#endif
using Newtonsoft.Json.Serialization;
@@ -36,7 +36,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -46,7 +46,7 @@ using NUnit.Framework;
using Newtonsoft.Json.Linq;
using System.IO;
using System.Collections;
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
using System.Web.UI;
#endif
#if NET20
@@ -692,7 +692,7 @@ Parameter name: arrayIndex");
Assert.AreEqual(p4, l[1]);
}
#if !(NET20 || NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void PropertyChanging()
{
@@ -1235,7 +1235,7 @@ Parameter name: arrayIndex");
}, "Can not add property Test3 to Newtonsoft.Json.Linq.JObject. Property with the same name already exists on object.");
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void IBindingListSortDirection()
{
@@ -1559,7 +1559,7 @@ Parameter name: arrayIndex");
Assert.AreEqual("Name2", value);
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void WriteObjectNullDBNullValue()
{
@@ -1671,7 +1671,7 @@ Parameter name: arrayIndex");
}, "Unexpected end of content while loading JObject. Path 'short.error.code', line 6, position 15.");
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void GetProperties()
{
@@ -37,7 +37,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -65,7 +65,7 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.AreEqual(p, p.Value.Parent);
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void ListChanged()
{
+1 -1
View File
@@ -27,7 +27,7 @@
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -28,7 +28,7 @@ using System.Collections.Generic;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -30,7 +30,7 @@ using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -25,7 +25,7 @@
using System;
using System.Collections.Generic;
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
using System.Numerics;
#endif
using System.Text;
@@ -34,7 +34,7 @@ using Newtonsoft.Json.Converters;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -361,7 +361,7 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.AreEqual(5, (int)(new JValue(StringComparison.OrdinalIgnoreCase)));
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
string bigIntegerText = "1234567899999999999999999999999999999999999999999999999999999999999990";
Assert.AreEqual(BigInteger.Parse(bigIntegerText), (new JValue(BigInteger.Parse(bigIntegerText))).Value);
@@ -441,7 +441,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 || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
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.");
@@ -458,7 +458,7 @@ namespace Newtonsoft.Json.Tests.Linq
[Test]
public void ToObject()
{
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
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?))));
@@ -515,7 +515,7 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.IsTrue(JToken.DeepEquals(new JValue((DateTimeOffset?)null), (JValue)(DateTimeOffset?)null));
#endif
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
// 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)));
@@ -1138,7 +1138,7 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.IsTrue(a.DeepEquals(a2));
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void Clone()
{
@@ -33,7 +33,7 @@ using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -124,7 +124,7 @@ namespace Newtonsoft.Json.Tests.Linq
jsonWriter.WriteValue("DVD read/writer");
Assert.AreEqual(WriteState.Array, jsonWriter.WriteState);
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
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 || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
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 || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void WriteBigInteger()
{
+11 -11
View File
@@ -28,7 +28,7 @@ using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using Newtonsoft.Json.Tests.TestObjects;
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
using System.Numerics;
#endif
using System.Text;
@@ -36,7 +36,7 @@ using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -129,7 +129,7 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.AreEqual("Pie", v.Value);
Assert.AreEqual(JTokenType.String, v.Type);
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
v.Value = DBNull.Value;
Assert.AreEqual(DBNull.Value, v.Value);
Assert.AreEqual(JTokenType.Null, v.Type);
@@ -158,7 +158,7 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.AreEqual(g, v.Value);
Assert.AreEqual(JTokenType.Guid, v.Type);
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
BigInteger i = BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990");
v.Value = i;
Assert.AreEqual(i, v.Value);
@@ -218,13 +218,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 || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
v = new JValue(BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990"));
Assert.AreEqual("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990", v.ToString(null, CultureInfo.InvariantCulture));
#endif
}
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void JValueParse()
{
@@ -473,7 +473,7 @@ namespace Newtonsoft.Json.Tests.Linq
}
#endif
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
[Test]
public void ConvertsToBoolean()
{
@@ -492,7 +492,7 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.AreEqual(Int32.MaxValue, Convert.ToInt32(new JValue(Int32.MaxValue)));
}
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void ConvertsToInt32_BigInteger()
{
@@ -654,7 +654,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 || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
v = new JValue(new BigInteger(3));
Assert.AreEqual(TypeCode.Object, v.GetTypeCode());
#endif
@@ -668,7 +668,7 @@ namespace Newtonsoft.Json.Tests.Linq
int i = (int)v.ToType(typeof(int), CultureInfo.InvariantCulture);
Assert.AreEqual(9, i);
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
BigInteger bi = (BigInteger)v.ToType(typeof(BigInteger), CultureInfo.InvariantCulture);
Assert.AreEqual(new BigInteger(9), bi);
#endif
@@ -683,7 +683,7 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.AreEqual("2013", v.ToString("yyyy"));
}
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void ToStringNewTypes()
{
@@ -34,7 +34,7 @@ using Newtonsoft.Json.Tests.Bson;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -651,7 +651,7 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
Assert.IsTrue(JToken.DeepEquals(new JObject(new JProperty("hi", 3)), t[1]));
}
#if !(PORTABLE || ASPNETCORE50 || PORTABLE40 || NET35 || NET20)
#if !(PORTABLE || DNXCORE50 || PORTABLE40 || NET35 || NET20)
[Test]
public void GreaterQueryBigInteger()
{
@@ -30,7 +30,7 @@ using Newtonsoft.Json.Linq.JsonPath;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -647,11 +647,11 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
[Test]
public void PropertyFollowingEscapedPropertyName()
{
JPath path = new JPath("frameworks.aspnetcore50.dependencies.['System.Xml.ReaderWriter'].source");
JPath path = new JPath("frameworks.dnxcore50.dependencies.['System.Xml.ReaderWriter'].source");
Assert.AreEqual(5, path.Filters.Count);
Assert.AreEqual("frameworks", ((FieldFilter)path.Filters[0]).Name);
Assert.AreEqual("aspnetcore50", ((FieldFilter)path.Filters[1]).Name);
Assert.AreEqual("dnxcore50", ((FieldFilter)path.Filters[1]).Name);
Assert.AreEqual("dependencies", ((FieldFilter)path.Filters[2]).Name);
Assert.AreEqual("System.Xml.ReaderWriter", ((FieldFilter)path.Filters[3]).Name);
Assert.AreEqual("source", ((FieldFilter)path.Filters[4]).Name);
@@ -32,7 +32,7 @@ using Newtonsoft.Json.Linq.JsonPath;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -31,7 +31,7 @@ using System.Globalization;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -209,7 +209,7 @@ undefined
{
string json = @"{
""frameworks"": {
""aspnetcore50"": {
""dnxcore50"": {
""dependencies"": {
""System.Xml.ReaderWriter"": {
""source"": ""NuGet""
@@ -221,9 +221,9 @@ undefined
JObject o = JObject.Parse(json);
JToken v1 = o["frameworks"]["aspnetcore50"]["dependencies"]["System.Xml.ReaderWriter"]["source"];
JToken v1 = o["frameworks"]["dnxcore50"]["dependencies"]["System.Xml.ReaderWriter"]["source"];
Assert.AreEqual("frameworks.aspnetcore50.dependencies.['System.Xml.ReaderWriter'].source", v1.Path);
Assert.AreEqual("frameworks.dnxcore50.dependencies.['System.Xml.ReaderWriter'].source", v1.Path);
JToken v2 = o.SelectToken(v1.Path);
+1 -1
View File
@@ -36,7 +36,7 @@ using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(ASPNETCORE50 || NETFX_CORE || PORTABLE40 || PORTABLE40)
#if !(DNXCORE50 || NETFX_CORE || PORTABLE40 || PORTABLE40)
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET20 || NET35 || NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || NETFX_CORE || PORTABLE || DNXCORE50)
using System.Xml;
using System;
using System.Collections;
@@ -30,7 +30,7 @@ using System.Collections.Generic;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -41,7 +41,7 @@ using Newtonsoft.Json.Schema;
using Newtonsoft.Json.Linq;
using System.IO;
using Newtonsoft.Json.Tests.TestObjects;
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
using System.Data;
#endif
@@ -204,7 +204,7 @@ namespace Newtonsoft.Json.Tests.Schema
#if !NET20
GenerateSchemaAndSerializeFromType(new NullableDateTimeTestClass());
#endif
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
GenerateSchemaAndSerializeFromType(new DataSet());
#endif
GenerateSchemaAndSerializeFromType(new object());
@@ -212,7 +212,7 @@ namespace Newtonsoft.Json.Tests.Schema
GenerateSchemaAndSerializeFromType("Hi");
GenerateSchemaAndSerializeFromType(new DateTime(2000, 12, 29, 23, 59, 0, DateTimeKind.Utc));
GenerateSchemaAndSerializeFromType(TimeSpan.FromTicks(1000000));
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
GenerateSchemaAndSerializeFromType(DBNull.Value);
#endif
GenerateSchemaAndSerializeFromType(new JsonPropertyWithHandlingValues());
@@ -29,7 +29,7 @@ using System;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -36,7 +36,7 @@ using Newtonsoft.Json.Utilities;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -95,7 +95,7 @@ namespace Newtonsoft.Json.Tests.Schema
Assert.IsTrue(o.IsValid(schema));
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void Generate_DefaultValueAttributeTestClass()
{
@@ -314,7 +314,7 @@ namespace Newtonsoft.Json.Tests.Schema
Assert.IsTrue(v.IsValid(schema));
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void GenerateSchemaForISerializable()
{
@@ -329,7 +329,7 @@ namespace Newtonsoft.Json.Tests.Schema
}
#endif
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void GenerateSchemaForDBNull()
{
@@ -376,7 +376,7 @@ namespace Newtonsoft.Json.Tests.Schema
generator.UndefinedSchemaIdHandling = UndefinedSchemaIdHandling.UseTypeName;
generator.ContractResolver = new CustomDirectoryInfoMapper
{
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
IgnoreSerializableAttribute = true
#endif
};
@@ -460,7 +460,7 @@ namespace Newtonsoft.Json.Tests.Schema
serializer.Converters.Add(new IsoDateTimeConverter());
serializer.ContractResolver = new CustomDirectoryInfoMapper
{
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
IgnoreSerializableInterface = true
#endif
};
@@ -480,7 +480,7 @@ namespace Newtonsoft.Json.Tests.Schema
generator.UndefinedSchemaIdHandling = UndefinedSchemaIdHandling.UseTypeName;
generator.ContractResolver = new CamelCasePropertyNamesContractResolver()
{
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
IgnoreSerializableAttribute = true
#endif
};
@@ -525,7 +525,7 @@ namespace Newtonsoft.Json.Tests.Schema
}", json);
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void GenerateSchemaSerializable()
{
@@ -29,7 +29,7 @@ using Newtonsoft.Json.Schema;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -29,7 +29,7 @@ using Newtonsoft.Json.Schema;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -24,7 +24,7 @@
#endregion
#pragma warning disable 618
#if !(ASPNETCORE50 || NETFX_CORE)
#if !(DNXCORE50 || NETFX_CORE)
using System;
using System.Collections.Generic;
using System.IO;
@@ -33,7 +33,7 @@ using Newtonsoft.Json.Schema;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -30,7 +30,7 @@ using Newtonsoft.Json.Serialization;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -105,7 +105,7 @@ namespace Newtonsoft.Json.Tests.Serialization
string json = o.ToString();
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
#pragma warning disable 618
[Test]
public void MemberSearchFlags()
@@ -30,7 +30,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -32,7 +32,7 @@ using System.Runtime.Serialization;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -565,7 +565,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}", startingWithB);
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
#pragma warning disable 618
[Test]
public void SerializeCompilerGeneratedMembers()
@@ -36,7 +36,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET40 || NET35 || NET20 || ASPNETCORE50 || PORTABLE || PORTABLE40 || NETFX_CORE)
#if !(NET40 || NET35 || NET20 || DNXCORE50 || PORTABLE || PORTABLE40 || NETFX_CORE)
using Autofac;
using Newtonsoft.Json.Serialization;
using Newtonsoft.Json.Tests.TestObjects;
@@ -37,7 +37,7 @@ using Microsoft.FSharp.Collections;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
using System.Reflection;
using System.Reflection.Emit;
using Newtonsoft.Json.Serialization;
@@ -38,7 +38,7 @@ using System.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -41,7 +41,7 @@ using Newtonsoft.Json.Utilities;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET35 || NET20 || NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
@@ -35,7 +35,7 @@ using Newtonsoft.Json.Converters;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -32,7 +32,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || NETFX_CORE || ASPNETCORE50)
#if !(NET35 || NET20 || NETFX_CORE || DNXCORE50)
using NUnit.Framework;
using System;
using System.Collections.Generic;
@@ -34,7 +34,7 @@ using System.Threading.Tasks;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -27,7 +27,7 @@
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -26,7 +26,7 @@
using System;
using System.Collections;
using System.Collections.Specialized;
#if !(NET35 || NET20 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50 || PORTABLE40)
using System.Collections.Concurrent;
#endif
using System.Collections.Generic;
@@ -45,7 +45,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -607,7 +607,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(3, v2["Third"]);
}
#if !(NET35 || NET20 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET35 || NET20 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void DeserializeConcurrentDictionary()
{
@@ -1321,7 +1321,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(1, (int)((JObject)o.Data[2])["one"]);
}
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
[Test]
public void SerializeArrayAsArrayList()
{
@@ -29,10 +29,10 @@ using System.ComponentModel;
using System.Collections.Concurrent;
#endif
using System.Collections.Generic;
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50)
using System.Numerics;
#endif
#if !(NET20 || NETFX_CORE || ASPNETCORE50)
#if !(NET20 || NETFX_CORE || DNXCORE50)
using System.ComponentModel.DataAnnotations;
using System.Configuration;
using System.Runtime.CompilerServices;
@@ -46,7 +46,7 @@ using System.Text.RegularExpressions;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -85,7 +85,7 @@ using Newtonsoft.Json.Utilities.LinqBridge;
#else
using System.Linq;
#endif
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
using System.Drawing;
using System.Diagnostics;
#endif
@@ -146,7 +146,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
#endif
#if !(NETFX_CORE || ASPNETCORE50 || NET20)
#if !(NETFX_CORE || DNXCORE50 || NET20)
[MetadataType(typeof(CustomerValidation))]
public partial class CustomerWithMetadataType
{
@@ -315,7 +315,7 @@ namespace Newtonsoft.Json.Tests.Serialization
public int ChildId;
}
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || ASPNETCORE50)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE || DNXCORE50)
[Test]
public void ReadIntegerWithError()
{
@@ -571,7 +571,7 @@ namespace Newtonsoft.Json.Tests.Serialization
serializer.ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor;
Assert.AreEqual(ConstructorHandling.AllowNonPublicDefaultConstructor, serializer.ConstructorHandling);
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
serializer.Context = new StreamingContext(StreamingContextStates.Other);
Assert.AreEqual(new StreamingContext(StreamingContextStates.Other), serializer.Context);
#endif
@@ -639,7 +639,7 @@ namespace Newtonsoft.Json.Tests.Serialization
serializer.TraceWriter = traceWriter;
Assert.AreEqual(traceWriter, serializer.TraceWriter);
#if !(PORTABLE || PORTABLE40 || NETFX_CORE || NET20 || ASPNETCORE50)
#if !(PORTABLE || PORTABLE40 || NETFX_CORE || NET20 || DNXCORE50)
serializer.TypeNameAssemblyFormat = FormatterAssemblyStyle.Full;
Assert.AreEqual(FormatterAssemblyStyle.Full, serializer.TypeNameAssemblyFormat);
#endif
@@ -663,7 +663,7 @@ namespace Newtonsoft.Json.Tests.Serialization
settings.ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor;
Assert.AreEqual(ConstructorHandling.AllowNonPublicDefaultConstructor, settings.ConstructorHandling);
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
settings.Context = new StreamingContext(StreamingContextStates.Other);
Assert.AreEqual(new StreamingContext(StreamingContextStates.Other), settings.Context);
#endif
@@ -731,7 +731,7 @@ namespace Newtonsoft.Json.Tests.Serialization
settings.TraceWriter = traceWriter;
Assert.AreEqual(traceWriter, settings.TraceWriter);
#if !(PORTABLE || PORTABLE40 || NETFX_CORE || NET20 || ASPNETCORE50)
#if !(PORTABLE || PORTABLE40 || NETFX_CORE || NET20 || DNXCORE50)
settings.TypeNameAssemblyFormat = FormatterAssemblyStyle.Full;
Assert.AreEqual(FormatterAssemblyStyle.Full, settings.TypeNameAssemblyFormat);
#endif
@@ -755,7 +755,7 @@ namespace Newtonsoft.Json.Tests.Serialization
serializerProxy.ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor;
Assert.AreEqual(ConstructorHandling.AllowNonPublicDefaultConstructor, serializerProxy.ConstructorHandling);
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
serializerProxy.Context = new StreamingContext(StreamingContextStates.Other);
Assert.AreEqual(new StreamingContext(StreamingContextStates.Other), serializerProxy.Context);
#endif
@@ -823,7 +823,7 @@ namespace Newtonsoft.Json.Tests.Serialization
serializerProxy.TraceWriter = traceWriter;
Assert.AreEqual(traceWriter, serializerProxy.TraceWriter);
#if !(PORTABLE || PORTABLE40 || NETFX_CORE || NET20 || ASPNETCORE50)
#if !(PORTABLE || PORTABLE40 || NETFX_CORE || NET20 || DNXCORE50)
serializerProxy.TypeNameAssemblyFormat = FormatterAssemblyStyle.Full;
Assert.AreEqual(FormatterAssemblyStyle.Full, serializerProxy.TypeNameAssemblyFormat);
#endif
@@ -832,7 +832,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(TypeNameHandling.All, serializerProxy.TypeNameHandling);
}
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || PORTABLE40 || DNXCORE50)
[Test]
public void DeserializeISerializableIConvertible()
{
@@ -1090,7 +1090,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual("value", deserialized.foo.bar);
}
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
[Test]
public void ConversionOperator()
{
@@ -1514,7 +1514,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(executorObject2.clientGetResultFunction, "ClientBanSubsCB");
}
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
[Test]
public void HashtableDeserialization()
{
@@ -1724,7 +1724,7 @@ keyword such as type of business.""
{
string json = @"[""vvv\/vvv\tvvv\""vvv\bvvv\nvvv\rvvv\\vvv\fvvv""]";
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
JavaScriptSerializer javaScriptSerializer = new JavaScriptSerializer();
List<string> javaScriptSerializerResult = javaScriptSerializer.Deserialize<List<string>>(json);
#endif
@@ -1736,7 +1736,7 @@ keyword such as type of business.""
Assert.AreEqual(1, jsonNetResult.Count);
Assert.AreEqual(dataContractResult[0], jsonNetResult[0]);
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
Assert.AreEqual(javaScriptSerializerResult[0], jsonNetResult[0]);
#endif
}
@@ -1955,7 +1955,7 @@ keyword such as type of business.""
string json = JsonConvert.SerializeObject(new ConverableMembers(), Formatting.Indented);
string expected = null;
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
expected = @"{
""String"": ""string"",
""Int32"": 2147483647,
@@ -1995,7 +1995,7 @@ keyword such as type of business.""
ConverableMembers c = JsonConvert.DeserializeObject<ConverableMembers>(json);
Assert.AreEqual("string", c.String);
Assert.AreEqual(double.MaxValue, c.Double);
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
Assert.AreEqual(DBNull.Value, c.DBNull);
#endif
}
@@ -2840,7 +2840,7 @@ keyword such as type of business.""
Assert.AreEqual("titleId", n.FidOrder[n.FidOrder.Count - 1]);
}
#if !(NET20 || NETFX_CORE || ASPNETCORE50)
#if !(NET20 || NETFX_CORE || DNXCORE50)
[MetadataType(typeof(OptInClassMetadata))]
public class OptInClass
{
@@ -3222,7 +3222,7 @@ To fix this error either change the JSON to a JSON object (e.g. {""name"":""valu
Path '', line 1, position 1.");
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
[Test]
public void CannotDeserializeArrayIntoSerializable()
{
@@ -3340,7 +3340,7 @@ Path '', line 1, position 1.");
{
ContractResolver = new DefaultContractResolver
{
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
IgnoreSerializableAttribute = true
#endif
}
@@ -3357,7 +3357,7 @@ Path '', line 1, position 1.");
{
ContractResolver = new DefaultContractResolver
{
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
IgnoreSerializableAttribute = true
#endif
}
@@ -3374,7 +3374,7 @@ Path '', line 1, position 1.");
{
ContractResolver = new DefaultContractResolver
{
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
IgnoreSerializableAttribute = true
#endif
}
@@ -3391,7 +3391,7 @@ Path '', line 1, position 1.");
{
ContractResolver = new DefaultContractResolver
{
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
IgnoreSerializableAttribute = true
#endif
}
@@ -4160,7 +4160,7 @@ Path '', line 1, position 1.");
Assert.AreEqual("value", newModelStateDictionary["key"]);
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
public class ISerializableTestObject : ISerializable
{
internal string _stringValue;
@@ -4486,7 +4486,7 @@ Path '', line 1, position 1.");
}", json);
}
#if !(PORTABLE || ASPNETCORE50)
#if !(PORTABLE || DNXCORE50)
[Test]
public void DeserializeClassWithInheritedProtectedMember()
{
@@ -4687,7 +4687,7 @@ Path '', line 1, position 1.");
}
#endif
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void SerializeDeserializeXmlNodeProperties()
{
@@ -5009,7 +5009,7 @@ Path '', line 1, position 1.");
Assert.AreEqual(0, z[1].Prop1.Length);
}
#if !(NET20 || NETFX_CORE || ASPNETCORE50)
#if !(NET20 || NETFX_CORE || DNXCORE50)
public class StringDictionaryTestClass
{
public StringDictionary StringDictionaryProperty { get; set; }
@@ -5336,7 +5336,7 @@ Path '', line 1, position 1.");
Assert.AreEqual(meh.IDontWork, "meh");
}
#if !(NET20 || NETFX_CORE || ASPNETCORE50)
#if !(NET20 || NETFX_CORE || DNXCORE50)
[DataContract]
public struct StructISerializable : ISerializable
{
@@ -6080,7 +6080,7 @@ Path '', line 1, position 1.");
}
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void SerializeException1()
{
@@ -6307,7 +6307,7 @@ Path '', line 1, position 1.");
Assert.AreEqual(-3, StaticTestClass.z);
}
#if !(NET20 || NETFX_CORE || ASPNETCORE50)
#if !(NET20 || NETFX_CORE || DNXCORE50)
[Test]
public void DeserializeDecimalsWithCulture()
{
@@ -6404,7 +6404,7 @@ Path '', line 1, position 1.");
ExceptionAssert.Throws<JsonSerializationException>(() => { List<int> numbers = JsonConvert.DeserializeObject<List<int>>(json); }, "Error converting value {null} to type 'System.Int32'. Path '[3]', line 5, position 7.");
}
#if !(PORTABLE || ASPNETCORE50 || NETFX_CORE)
#if !(PORTABLE || DNXCORE50 || NETFX_CORE)
public class ConvertableIntTestClass
{
public ConvertibleInt Integer { get; set; }
@@ -6761,7 +6761,7 @@ Path '', line 1, position 1.");
}
#endif
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
[Test]
public void MetroBlogPost()
{
@@ -7125,7 +7125,7 @@ Path '', line 1, position 1.");
Assert.AreEqual("", s);
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void SerializeAndDeserializeWithAttributes()
{
@@ -7286,7 +7286,7 @@ Path '', line 1, position 1.");
ExceptionAssert.Throws<JsonReaderException>(() => { s.Deserialize<Dictionary<string, int>>(new JsonTextReader(new StringReader(json))); }, "Additional text encountered after finished reading JSON content: {. Path '', line 1, position 7.");
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void DeserializeException()
{
@@ -7470,7 +7470,7 @@ Path '', line 1, position 1.");
}
#if !(NET20 || NET35 || NET40 || PORTABLE40)
#if !(PORTABLE || ASPNETCORE50)
#if !(PORTABLE || DNXCORE50)
[Test]
public void DeserializeReadOnlyListWithBigInteger()
{
@@ -7528,7 +7528,7 @@ Path '', line 1, position 1.");
Action doStuff = () => { obj = JsonConvert.DeserializeObject<MyTuple<int>>(json); };
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
doStuff();
Assert.AreEqual(500, obj.Item1);
#else
@@ -7559,7 +7559,7 @@ Path '', line 1, position 1.");
}
#endif
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || NET35 || NET20 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || NET35 || NET20 || PORTABLE40)
[Test]
public void SerializeTupleWithSerializableAttribute()
{
@@ -7805,7 +7805,7 @@ Path '', line 1, position 1.");
}
#endif
#if !(PORTABLE || ASPNETCORE50 || NET35 || NET20 || PORTABLE40)
#if !(PORTABLE || DNXCORE50 || NET35 || NET20 || PORTABLE40)
[Test]
public void ReadTooLargeInteger()
{
@@ -7819,7 +7819,7 @@ Path '', line 1, position 1.");
}
#endif
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
[Serializable]
#endif
[DataContract]
@@ -7848,7 +7848,7 @@ Path '', line 1, position 1.");
Assert.AreEqual(@"{""First"":""One"",""Second"":2}", json);
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
DefaultContractResolver r = new DefaultContractResolver();
r.IgnoreSerializableAttribute = false;
@@ -7964,7 +7964,7 @@ Path '', line 1, position 1.");
Assert.AreEqual(1234567890.123456m, d);
}
#if !(PORTABLE || ASPNETCORE50 || NETFX_CORE || PORTABLE40)
#if !(PORTABLE || DNXCORE50 || NETFX_CORE || PORTABLE40)
[Test]
public void DontSerializeStaticFields()
{
@@ -7988,7 +7988,7 @@ Path '', line 1, position 1.");
}
#endif
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void SerializeBigInteger()
{
@@ -8073,7 +8073,7 @@ Path '', line 1, position 1.");
]", json);
}
#if !(PORTABLE || PORTABLE40 || NETFX_CORE || ASPNETCORE50)
#if !(PORTABLE || PORTABLE40 || NETFX_CORE || DNXCORE50)
[Test]
public void SerializeDictionaryWithStructKey()
{
@@ -8126,7 +8126,7 @@ Path '', line 1, position 1.");
Assert.AreEqual(jane, john.Spouse);
}
#if !(NETFX_CORE || NET35 || NET20 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || NET35 || NET20 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void TypeConverterOnInterface()
{
@@ -8192,7 +8192,7 @@ Path '', line 1, position 1.");
ParticipantEntity deserializedProduct = JsonConvert.DeserializeObject<ParticipantEntity>(json);
}
#if !(PORTABLE || ASPNETCORE50 || NETFX_CORE)
#if !(PORTABLE || DNXCORE50 || NETFX_CORE)
public class ConvertibleId : IConvertible
{
public int Value;
@@ -34,7 +34,7 @@ using Newtonsoft.Json.Utilities;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -342,7 +342,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.IsTrue(JToken.DeepEquals(t1, t2));
}
#if !(PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void DeserializeGenericObjectListWithTypeName()
{
@@ -31,7 +31,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -30,7 +30,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -31,7 +31,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -34,7 +34,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -29,7 +29,7 @@ using System.Collections.Generic;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -153,7 +153,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}", json);
}
#if !(PORTABLE || ASPNETCORE50 || NETFX_CORE || PORTABLE40)
#if !(PORTABLE || DNXCORE50 || NETFX_CORE || PORTABLE40)
public class MainClass : ISerializable
{
public ChildClass Child { get; set; }
@@ -36,7 +36,7 @@ using Newtonsoft.Json.Utilities;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -39,7 +39,7 @@ using System.Linq;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -41,7 +41,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -273,7 +273,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}", json);
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
public class SerializationEventContextTestObject
{
public string TestMember { get; set; }
@@ -304,7 +304,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
#endif
#if !(PORTABLE || ASPNETCORE50)
#if !(PORTABLE || DNXCORE50)
public void WhenSerializationErrorDetectedBySerializer_ThenCallbackIsCalled()
{
// Verify contract is properly finding our callback
@@ -33,7 +33,7 @@ using Newtonsoft.Json.Serialization;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -4,7 +4,7 @@ using System.Diagnostics;
using System.Globalization;
using System.IO;
using Newtonsoft.Json.Linq;
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
using System.Numerics;
#endif
using System.Runtime.Serialization;
@@ -14,7 +14,7 @@ using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -43,7 +43,7 @@ namespace Newtonsoft.Json.Tests.Serialization
[TestFixture]
public class TraceWriterTests : TestFixtureBase
{
#if !(PORTABLE || ASPNETCORE50 || NETFX_CORE || PORTABLE40)
#if !(PORTABLE || DNXCORE50 || NETFX_CORE || PORTABLE40)
[Test]
public void DiagnosticsTraceWriterTest()
{
@@ -604,7 +604,7 @@ Newtonsoft.Json Error: 0 : Error!
Assert.IsTrue(traceWriter.TraceRecords[9].Message.StartsWith("Finished deserializing System.Collections.Generic.List`1[System.Object]. Path '$values'"));
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void DeserializeISerializable()
{
@@ -810,7 +810,7 @@ Newtonsoft.Json Error: 0 : Error!
Assert.AreEqual(23, deserialized.FavoriteNumber);
}
#if !(NET20 || NET35 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void TraceJsonWriterTest()
{
@@ -47,7 +47,7 @@ using Newtonsoft.Json.Tests.TestObjects;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -332,7 +332,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual("Name!", ((EmployeeReference)employee).Name);
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
[Test]
public void DeserializeTypeNameFromGacAssembly()
{
@@ -1104,7 +1104,7 @@ namespace Newtonsoft.Json.Tests.Serialization
CollectionAssert.AreEquivalent(data, d);
}
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
[Test]
public void ISerializableTypeNameHandlingTest()
{
@@ -1167,7 +1167,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Binder = new MetroBinder(),
ContractResolver = new DefaultContractResolver
{
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
IgnoreSerializableAttribute = true
#endif
}
@@ -1198,7 +1198,7 @@ namespace Newtonsoft.Json.Tests.Serialization
public override void BindToName(Type serializedType, out string assemblyName, out string typeName)
{
assemblyName = "AssemblyName";
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
typeName = ":::" + serializedType.Name.ToUpper(CultureInfo.InvariantCulture) + ":::";
#else
typeName = ":::" + serializedType.Name.ToUpper() + ":::";
@@ -1643,7 +1643,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
#endif
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
[Test]
public void SerializeDeserialize_DictionaryContextContainsGuid_DeserializesItemAsGuid()
{
@@ -1886,7 +1886,7 @@ namespace Newtonsoft.Json.Tests.Serialization
public string SomeProperty { get; set; }
}
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
public class ParentParent
{
[JsonProperty(ItemTypeNameHandling = TypeNameHandling.Auto)]
@@ -1954,7 +1954,7 @@ namespace Newtonsoft.Json.Tests.Serialization
public int Quantity { get; set; }
}
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
public class SerializableWrapper
{
public object Content { get; set; }
@@ -34,7 +34,7 @@ using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Test = Xunit.FactAttribute;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
@@ -63,7 +63,7 @@ namespace Newtonsoft.Json.Tests.Serialization
nonSerializedField = "Error"
};
#if !(NETFX_CORE || NET20 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || NET20 || PORTABLE || DNXCORE50 || PORTABLE40)
MemoryStream ms = new MemoryStream();
DataContractJsonSerializer dataContractJsonSerializer = new DataContractJsonSerializer(typeof(SerializableType));
dataContractJsonSerializer.WriteObject(ms, serializableType);
@@ -79,7 +79,7 @@ namespace Newtonsoft.Json.Tests.Serialization
{
ContractResolver = new DefaultContractResolver
{
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
IgnoreSerializableAttribute = false
#endif
}
@@ -88,7 +88,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(expected, json);
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Test]
public void SerializeInheritedType()
{
@@ -118,7 +118,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[Serializable]
#else
[JsonObject(MemberSerialization.Fields)]
@@ -142,7 +142,7 @@ namespace Newtonsoft.Json.Tests.Serialization
set { privateField = value; }
}
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || DNXCORE50 || PORTABLE40)
[NonSerialized]
#else
[JsonIgnore]
+8 -8
View File
@@ -41,7 +41,7 @@ using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using TestMethod = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
using SetUp = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestInitializeAttribute;
#elif ASPNETCORE50
#elif DNXCORE50
using Xunit;
using Assert = Newtonsoft.Json.Tests.XUnitAssert;
using XAssert = Xunit.Assert;
@@ -62,7 +62,7 @@ namespace Newtonsoft.Json.Tests
{
public static IEnumerable<ConstructorInfo> GetConstructors(Type type)
{
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
return type.GetConstructors();
#else
return type.GetTypeInfo().DeclaredConstructors;
@@ -71,7 +71,7 @@ namespace Newtonsoft.Json.Tests
public static PropertyInfo GetProperty(Type type, string name)
{
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
return type.GetProperty(name);
#else
return type.GetTypeInfo().GetDeclaredProperty(name);
@@ -80,7 +80,7 @@ namespace Newtonsoft.Json.Tests
public static FieldInfo GetField(Type type, string name)
{
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
return type.GetField(name);
#else
return type.GetTypeInfo().GetDeclaredField(name);
@@ -89,7 +89,7 @@ namespace Newtonsoft.Json.Tests
public static MethodInfo GetMethod(Type type, string name)
{
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
return type.GetMethod(name);
#else
return type.GetTypeInfo().GetDeclaredMethod(name);
@@ -97,7 +97,7 @@ namespace Newtonsoft.Json.Tests
}
}
#if ASPNETCORE50
#if DNXCORE50
public class TestFixtureAttribute : Attribute
{
// xunit doesn't need a test fixture attribute
@@ -254,7 +254,7 @@ namespace Newtonsoft.Json.Tests
return bytes;
}
#if ASPNETCORE50
#if DNXCORE50
protected TestFixtureBase()
#else
[SetUp]
@@ -312,7 +312,7 @@ namespace Newtonsoft.Json.Tests
public static void Contains(IList collection, object value, string message)
{
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
Assert.Contains(value, collection, message);
#else
if (!collection.Cast<object>().Any(i => i.Equals(value)))
@@ -33,7 +33,7 @@ using System.Linq;
namespace Newtonsoft.Json.Tests.TestObjects
{
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
[Serializable]
public class AnswerFilterModel
{
@@ -41,7 +41,7 @@ namespace Newtonsoft.Json.Tests.TestObjects
public ulong ULong = long.MaxValue;
public double Double = double.MaxValue;
public float Float = float.MaxValue;
#if !(NETFX_CORE || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE || DNXCORE50)
public DBNull DBNull = DBNull.Value;
#endif
public bool Bool = true;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || NETFX_CORE || ASPNETCORE50)
#if !(NET35 || NET20 || NETFX_CORE || DNXCORE50)
using Microsoft.FSharp.Core;
using System;
using System.Collections;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NETFX_CORE || PORTABLE40 || PORTABLE || ASPNETCORE50)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE || DNXCORE50)
using System;
using System.Collections.Generic;
using System.Text;
@@ -27,7 +27,7 @@ using System.ComponentModel;
namespace Newtonsoft.Json.Tests.TestObjects
{
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
[Description("DefaultValueAttributeTestClass description!")]
#endif
public sealed class DefaultValueAttributeTestClass
@@ -36,7 +36,7 @@ using System.Linq;
namespace Newtonsoft.Json.Tests.TestObjects
{
#if !(NETFX_CORE || NET35 || NET20 || PORTABLE || ASPNETCORE50 || PORTABLE40)
#if !(NETFX_CORE || NET35 || NET20 || PORTABLE || DNXCORE50 || PORTABLE40)
[TypeConverter(typeof(MyInterfaceConverter))]
internal interface IMyInterface
{
@@ -32,7 +32,7 @@ namespace Newtonsoft.Json.Tests.TestObjects
{
protected internal override string ResolvePropertyName(string propertyName)
{
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
return ":::" + propertyName.ToUpper(CultureInfo.InvariantCulture) + ":::";
#else
return ":::" + propertyName.ToUpper() + ":::";
@@ -32,7 +32,7 @@ namespace Newtonsoft.Json.Tests.TestObjects
{
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
writer.WriteValue(":::" + value.ToString().ToUpper(CultureInfo.InvariantCulture) + ":::");
#else
writer.WriteValue(":::" + value.ToString().ToUpper() + ":::");
@@ -45,7 +45,7 @@ namespace Newtonsoft.Json.Tests.TestObjects
if (s == null)
return null;
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
return s.ToLower(CultureInfo.InvariantCulture).Trim(new[] { ':' });
#else
return s.ToLower().Trim(new[] { ':' });
@@ -31,7 +31,7 @@ using System.ComponentModel;
namespace Newtonsoft.Json.Tests.TestObjects
{
[JsonObject(Id = "Person", Title = "Title!", Description = "JsonObjectAttribute description!", MemberSerialization = MemberSerialization.OptIn)]
#if !(NETFX_CORE || ASPNETCORE50)
#if !(NETFX_CORE || DNXCORE50)
[Description("DescriptionAttribute description!")]
#endif
public class Person

Some files were not shown because too many files have changed in this diff Show More