-Added Portable Class Library build

This commit is contained in:
James Newton-King
2012-04-18 21:02:34 +12:00
parent 6725edb75c
commit 10256fcf68
85 changed files with 1005 additions and 344 deletions
@@ -29,7 +29,7 @@ namespace Newtonsoft.Json.Tests.Converters
public byte[] NullByteArray { get; set; }
}
#if !SILVERLIGHT && !PocketPC && !NET20 && !NETFX_CORE
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE)
[Test]
public void DeserializeBinaryClass()
{
@@ -87,7 +87,7 @@ namespace Newtonsoft.Json.Tests.Converters
byteArrayClass.ByteArray = TestData;
byteArrayClass.NullByteArray = null;
string json = JsonConvert.SerializeObject(byteArrayClass, Formatting.Indented, new BinaryConverter());
string json = JsonConvert.SerializeObject(byteArrayClass, Formatting.Indented);
Assert.AreEqual(@"{
""ByteArray"": ""VGhpcyBpcyBzb21lIHRlc3QgZGF0YSEhIQ=="",
@@ -95,7 +95,7 @@ namespace Newtonsoft.Json.Tests.Converters
}", json);
}
#if !(SILVERLIGHT || NETFX_CORE)
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
public class SqlBinaryClass
{
public SqlBinary SqlBinary { get; set; }
@@ -145,7 +145,7 @@ namespace Newtonsoft.Json.Tests.Converters
""NullByteArray"": null
}";
ByteArrayClass byteArrayClass = JsonConvert.DeserializeObject<ByteArrayClass>(json, new BinaryConverter());
ByteArrayClass byteArrayClass = JsonConvert.DeserializeObject<ByteArrayClass>(json);
CollectionAssert.AreEquivalent(TestData, byteArrayClass.ByteArray);
Assert.AreEqual(null, byteArrayClass.NullByteArray);
@@ -1,4 +1,4 @@
#if !(SILVERLIGHT || NETFX_CORE)
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
using System;
using Newtonsoft.Json.Converters;
#if !NETFX_CORE
@@ -1,4 +1,4 @@
#if !(SILVERLIGHT || NETFX_CORE)
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
using System;
#if !NETFX_CORE
using NUnit.Framework;
@@ -1,4 +1,4 @@
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20 || WINDOWS_PHONE || PORTABLE)
using System;
using System.Collections.Generic;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !SILVERLIGHT && !NETFX_CORE
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
using System;
using System.Collections.Generic;
using Newtonsoft.Json.Tests.Serialization;