-Portable build issue fixed (hopefully)
This commit is contained in:
@@ -27,25 +27,25 @@
|
|||||||
extern alias NewtonsoftJson;
|
extern alias NewtonsoftJson;
|
||||||
using FormatterAssemblyStyle = NewtonsoftJson::System.Runtime.Serialization.Formatters.FormatterAssemblyStyle;
|
using FormatterAssemblyStyle = NewtonsoftJson::System.Runtime.Serialization.Formatters.FormatterAssemblyStyle;
|
||||||
#endif
|
#endif
|
||||||
using System;
|
using global::System;
|
||||||
using System.Collections;
|
using global::System.Collections;
|
||||||
using System.Collections.Generic;
|
using global::System.Collections.Generic;
|
||||||
using System.Globalization;
|
using global::System.Globalization;
|
||||||
using System.Runtime.Serialization.Formatters;
|
using global::System.Runtime.Serialization.Formatters;
|
||||||
using Newtonsoft.Json.Linq;
|
using global::Newtonsoft.Json.Linq;
|
||||||
using Newtonsoft.Json.Serialization;
|
using global::Newtonsoft.Json.Serialization;
|
||||||
using Newtonsoft.Json.Tests.TestObjects;
|
using global::Newtonsoft.Json.Tests.TestObjects;
|
||||||
#if !NETFX_CORE
|
#if !NETFX_CORE
|
||||||
using NUnit.Framework;
|
using global::NUnit.Framework;
|
||||||
#else
|
#else
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using global::Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using TestFixture = Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute;
|
using TestFixture = global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute;
|
||||||
using Test = Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute;
|
using Test = global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute;
|
||||||
#endif
|
#endif
|
||||||
using Newtonsoft.Json.Utilities;
|
using global::Newtonsoft.Json.Utilities;
|
||||||
using System.Net;
|
using global::System.Net;
|
||||||
using System.Runtime.Serialization;
|
using global::System.Runtime.Serialization;
|
||||||
using System.IO;
|
using global::System.IO;
|
||||||
|
|
||||||
namespace Newtonsoft.Json.Tests.Serialization
|
namespace Newtonsoft.Json.Tests.Serialization
|
||||||
{
|
{
|
||||||
@@ -278,7 +278,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
|||||||
@"Type specified in JSON '" + employeeRef + @"' is not compatible with '" + personRef + @"'. Path '$type', line 3, position 143.",
|
@"Type specified in JSON '" + employeeRef + @"' is not compatible with '" + personRef + @"'. Path '$type', line 3, position 143.",
|
||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
JsonConvert.DeserializeObject(json, typeof (Person), new JsonSerializerSettings
|
JsonConvert.DeserializeObject(json, typeof(Person), new JsonSerializerSettings
|
||||||
{
|
{
|
||||||
TypeNameHandling = TypeNameHandling.Objects,
|
TypeNameHandling = TypeNameHandling.Objects,
|
||||||
TypeNameAssemblyFormat = FormatterAssemblyStyle.Full
|
TypeNameAssemblyFormat = FormatterAssemblyStyle.Full
|
||||||
@@ -522,7 +522,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
|||||||
{
|
{
|
||||||
public override Type BindToType(string assemblyName, string typeName)
|
public override Type BindToType(string assemblyName, string typeName)
|
||||||
{
|
{
|
||||||
return typeof (Person);
|
return typeof(Person);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -716,7 +716,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
|||||||
|
|
||||||
Message deserialized = JsonConvert.DeserializeObject<Message>(json);
|
Message deserialized = JsonConvert.DeserializeObject<Message>(json);
|
||||||
|
|
||||||
SearchDetails searchDetails = (SearchDetails) deserialized.Body;
|
SearchDetails searchDetails = (SearchDetails)deserialized.Body;
|
||||||
// Json.NET
|
// Json.NET
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -748,7 +748,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
|||||||
TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple
|
TypeNameAssemblyFormat = FormatterAssemblyStyle.Simple
|
||||||
});
|
});
|
||||||
|
|
||||||
string urlStatusTypeName = ReflectionUtils.GetTypeName(typeof (UrlStatus), FormatterAssemblyStyle.Simple);
|
string urlStatusTypeName = ReflectionUtils.GetTypeName(typeof(UrlStatus), FormatterAssemblyStyle.Simple);
|
||||||
|
|
||||||
Assert.AreEqual(@"{
|
Assert.AreEqual(@"{
|
||||||
""$type"": ""System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Object, mscorlib]], mscorlib"",
|
""$type"": ""System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Object, mscorlib]], mscorlib"",
|
||||||
@@ -791,7 +791,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
|||||||
Assert.AreEqual(3, newCollection.Count);
|
Assert.AreEqual(3, newCollection.Count);
|
||||||
Assert.AreEqual(@"http://www.bing.com", ((UrlStatus)newCollection["First"]).Url);
|
Assert.AreEqual(@"http://www.bing.com", ((UrlStatus)newCollection["First"]).Url);
|
||||||
|
|
||||||
List<UrlStatus> statues = (List<UrlStatus>) newCollection["List"];
|
List<UrlStatus> statues = (List<UrlStatus>)newCollection["List"];
|
||||||
Assert.AreEqual(2, statues.Count);
|
Assert.AreEqual(2, statues.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -874,7 +874,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
|||||||
{
|
{
|
||||||
Car testerObject = new Car();
|
Car testerObject = new Car();
|
||||||
testerObject.Year = new DateTime(2000, 10, 5, 1, 1, 1, DateTimeKind.Utc);
|
testerObject.Year = new DateTime(2000, 10, 5, 1, 1, 1, DateTimeKind.Utc);
|
||||||
byte[] data = new byte[] {75, 65, 82, 73, 82, 65};
|
byte[] data = new byte[] { 75, 65, 82, 73, 82, 65 };
|
||||||
testerObject.Objects = new object[] { data, "prueba" };
|
testerObject.Objects = new object[] { data, "prueba" };
|
||||||
|
|
||||||
JsonSerializerSettings jsonSettings = new JsonSerializerSettings();
|
JsonSerializerSettings jsonSettings = new JsonSerializerSettings();
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
extern alias NewtonsoftJson;
|
extern alias NewtonsoftJson;
|
||||||
using FormatterAssemblyStyle = NewtonsoftJson::System.Runtime.Serialization.Formatters.FormatterAssemblyStyle;
|
using FormatterAssemblyStyle = NewtonsoftJson::System.Runtime.Serialization.Formatters.FormatterAssemblyStyle;
|
||||||
#endif
|
#endif
|
||||||
using System;
|
using global::System;
|
||||||
using System.Collections.Generic;
|
using global::System.Collections.Generic;
|
||||||
using System.Runtime.Serialization.Formatters;
|
using global::System.Runtime.Serialization.Formatters;
|
||||||
#if !NETFX_CORE
|
#if !NETFX_CORE
|
||||||
using NUnit.Framework;
|
using global::NUnit.Framework;
|
||||||
#else
|
#else
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using global::Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using TestFixture = Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute;
|
using TestFixture = global::Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute;
|
||||||
using Test = Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute;
|
using Test = global::Microsoft.VisualStudio.TestTools.UnitTesting.TestMethodAttribute;
|
||||||
#endif
|
#endif
|
||||||
using Newtonsoft.Json.Utilities;
|
using global::Newtonsoft.Json.Utilities;
|
||||||
|
|
||||||
namespace Newtonsoft.Json.Tests.Utilities
|
namespace Newtonsoft.Json.Tests.Utilities
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user