-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
@@ -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]