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