-Readded .NET 4, SL4, WP7, Win8 portable library
-Disable SL library build
This commit is contained in:
@@ -1365,7 +1365,7 @@ namespace Newtonsoft.Json.Tests.Bson
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
public class BigIntegerTestClass
|
||||
{
|
||||
public BigInteger Blah { get; set; }
|
||||
|
||||
@@ -698,7 +698,7 @@ namespace Newtonsoft.Json.Tests.Bson
|
||||
Assert.AreEqual("10-00-00-00-09-30-00-C8-88-07-6B-DC-00-00-00-00", (BitConverter.ToString(ms.ToArray())));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void WriteBigInteger()
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
public byte[] NullByteArray { get; set; }
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void DeserializeBinaryClass()
|
||||
{
|
||||
@@ -120,7 +120,7 @@ namespace Newtonsoft.Json.Tests.Converters
|
||||
}", json);
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
public class SqlBinaryClass
|
||||
{
|
||||
public SqlBinary SqlBinary { get; set; }
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
using System;
|
||||
using Newtonsoft.Json.Converters;
|
||||
#if !NETFX_CORE
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
using System;
|
||||
#if !NETFX_CORE
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NET35 || NET20)
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Tests.Serialization;
|
||||
|
||||
@@ -242,7 +242,7 @@ now brown cow?", '"', true);
|
||||
value = null;
|
||||
Assert.AreEqual("null", JsonConvert.ToString(value));
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
value = DBNull.Value;
|
||||
Assert.AreEqual("null", JsonConvert.ToString(value));
|
||||
#endif
|
||||
@@ -636,7 +636,7 @@ now brown cow?", '"', true);
|
||||
return (T)converter.ReadJson(reader, typeof(T), null, null);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40)
|
||||
[Test]
|
||||
public void Async()
|
||||
{
|
||||
|
||||
@@ -352,7 +352,7 @@ namespace Newtonsoft.Json.Tests
|
||||
Assert.IsNotNull(validationEventArgs);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void IntegerGreaterThanMaximumValue_BigInteger()
|
||||
{
|
||||
@@ -606,7 +606,7 @@ namespace Newtonsoft.Json.Tests
|
||||
Assert.IsNotNull(validationEventArgs);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void BigIntegerDivisibleBy_Success()
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
using NUnit.Framework;
|
||||
using System.Web.UI;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
using NUnit.Framework;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NET35 || NET20)
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
|
||||
@@ -477,7 +477,7 @@ Parameter name: index",
|
||||
}
|
||||
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void ITypedListGetItemProperties()
|
||||
{
|
||||
|
||||
@@ -686,7 +686,7 @@ Parameter name: arrayIndex",
|
||||
Assert.AreEqual(p4, l[1]);
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void PropertyChanging()
|
||||
{
|
||||
@@ -1243,7 +1243,7 @@ Parameter name: arrayIndex",
|
||||
});
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void IBindingListSortDirection()
|
||||
{
|
||||
@@ -1446,7 +1446,7 @@ Parameter name: arrayIndex",
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SILVERLIGHT || !(NET20 || NET35)
|
||||
#if SILVERLIGHT || !(NET20 || NET35 || PORTABLE40)
|
||||
[Test]
|
||||
public void CollectionChanged()
|
||||
{
|
||||
@@ -1576,7 +1576,7 @@ Parameter name: arrayIndex",
|
||||
Assert.AreEqual("Name2", value);
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void WriteObjectNullDBNullValue()
|
||||
{
|
||||
@@ -1632,7 +1632,7 @@ Parameter name: arrayIndex",
|
||||
});
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void NumberTooBigForInt64()
|
||||
{
|
||||
@@ -1707,7 +1707,7 @@ Parameter name: arrayIndex",
|
||||
});
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void GetProperties()
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(p, p.Value.Parent);
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void ListChanged()
|
||||
{
|
||||
|
||||
@@ -348,7 +348,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
|
||||
Assert.AreEqual(5, (int)(new JValue(StringComparison.OrdinalIgnoreCase)));
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
string bigIntegerText = "1234567899999999999999999999999999999999999999999999999999999999999990";
|
||||
|
||||
Assert.AreEqual(BigInteger.Parse(bigIntegerText), (BigInteger)(new JValue(bigIntegerText)));
|
||||
@@ -424,7 +424,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
#endif
|
||||
ExceptionAssert.Throws<ArgumentException>("Can not convert Boolean to Uri.", () => { var i = (Uri)new JValue(true); });
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
ExceptionAssert.Throws<ArgumentException>("Can not convert Uri to BigInteger.", () => { var i = (BigInteger)new JValue(new Uri("http://www.google.com")); });
|
||||
ExceptionAssert.Throws<ArgumentException>("Can not convert Null to BigInteger.", () => { var i = (BigInteger)new JValue((object)null); });
|
||||
ExceptionAssert.Throws<ArgumentException>("Can not convert Guid to BigInteger.", () => { var i = (BigInteger)new JValue(Guid.NewGuid()); });
|
||||
@@ -488,7 +488,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue((DateTimeOffset?)null), (JValue)(DateTimeOffset?)null));
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue(new BigInteger(1)), (JValue)new BigInteger(1)));
|
||||
Assert.IsTrue(JToken.DeepEquals(new JValue((BigInteger?)null), (JValue)(BigInteger?)null));
|
||||
#endif
|
||||
@@ -926,7 +926,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.IsTrue(a.DeepEquals(a2));
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void Clone()
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual("Pie", v.Value);
|
||||
Assert.AreEqual(JTokenType.String, v.Type);
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
v.Value = DBNull.Value;
|
||||
Assert.AreEqual(DBNull.Value, v.Value);
|
||||
Assert.AreEqual(JTokenType.Null, v.Type);
|
||||
@@ -115,7 +115,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(g, v.Value);
|
||||
Assert.AreEqual(JTokenType.Guid, v.Type);
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
BigInteger i = BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990");
|
||||
v.Value = i;
|
||||
Assert.AreEqual(i, v.Value);
|
||||
@@ -175,13 +175,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 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
v = new JValue(BigInteger.Parse("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990"));
|
||||
Assert.AreEqual("123456789999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999990", v.ToString(null, CultureInfo.InvariantCulture));
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void JValueParse()
|
||||
{
|
||||
@@ -456,7 +456,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual(Int32.MaxValue, Convert.ToInt32(new JValue(Int32.MaxValue)));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void ConvertsToInt32_BigInteger()
|
||||
{
|
||||
@@ -593,7 +593,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
v = new JValue(new Uri("http://www.google.com"));
|
||||
Assert.AreEqual(TypeCode.Object, v.GetTypeCode());
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
v = new JValue(new BigInteger(3));
|
||||
Assert.AreEqual(TypeCode.Object, v.GetTypeCode());
|
||||
#endif
|
||||
@@ -622,7 +622,7 @@ namespace Newtonsoft.Json.Tests.Linq
|
||||
Assert.AreEqual("2013", v.ToString("yyyy"));
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void ToStringNewTypes()
|
||||
{
|
||||
|
||||
@@ -718,7 +718,7 @@ keyword such as type of business.""
|
||||
Assert.AreEqual(new DateTime(2000, 10, 15, 5, 5, 5, DateTimeKind.Utc), d);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40)
|
||||
[Test]
|
||||
public void CovariantIJEnumerable()
|
||||
{
|
||||
@@ -733,6 +733,19 @@ keyword such as type of business.""
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !NET20
|
||||
[Test]
|
||||
public void LinqCast()
|
||||
{
|
||||
JToken olist = JArray.Parse("[12,55]");
|
||||
|
||||
List<int> list1 = olist.AsEnumerable().Values<int>().ToList();
|
||||
|
||||
Assert.AreEqual(12, list1[0]);
|
||||
Assert.AreEqual(55, list1[1]);
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void ChildrenExtension()
|
||||
{
|
||||
|
||||
@@ -75,4 +75,4 @@ using System.Security;
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("4.5.0.0")]
|
||||
[assembly: AssemblyFileVersion("5.0.1.16001")]
|
||||
[assembly: AssemblyFileVersion("5.0.1.16006")]
|
||||
|
||||
@@ -202,7 +202,7 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
#if !NET20
|
||||
GenerateSchemaAndSerializeFromType(new NullableDateTimeTestClass());
|
||||
#endif
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
GenerateSchemaAndSerializeFromType(new DataSet());
|
||||
#endif
|
||||
GenerateSchemaAndSerializeFromType(new object());
|
||||
@@ -210,7 +210,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)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
GenerateSchemaAndSerializeFromType(DBNull.Value);
|
||||
#endif
|
||||
GenerateSchemaAndSerializeFromType(new JsonPropertyWithHandlingValues());
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
Assert.IsTrue(o.IsValid(schema));
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void Generate_DefaultValueAttributeTestClass()
|
||||
{
|
||||
@@ -310,7 +310,7 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
Assert.IsTrue(v.IsValid(schema));
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void GenerateSchemaForISerializable()
|
||||
{
|
||||
@@ -325,7 +325,7 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void GenerateSchemaForDBNull()
|
||||
{
|
||||
@@ -519,7 +519,7 @@ namespace Newtonsoft.Json.Tests.Schema
|
||||
}", json);
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void GenerateSchemaSerializable()
|
||||
{
|
||||
|
||||
+2
-2
@@ -102,7 +102,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
string json = o.ToString();
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void MemberSearchFlags()
|
||||
{
|
||||
@@ -177,7 +177,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}", json);
|
||||
}
|
||||
|
||||
#if !(NET35 || NET20)
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
[Test]
|
||||
public void DynamicCamelCasePropertyNames()
|
||||
{
|
||||
|
||||
@@ -182,7 +182,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}", startingWithB);
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void SerializeCompilerGeneratedMembers()
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NET35 || NET20)
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -100,7 +100,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
Assert.AreEqual(dynamicObject.ChildObject.Text, d.ChildObject.Text);
|
||||
}
|
||||
|
||||
#if !PORTABLE
|
||||
#if !(PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void SerializeDynamicObjectWithObjectTracking()
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(NET35 || NET20 || SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(NET35 || NET20 || SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
||||
@@ -792,7 +792,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)
|
||||
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
Assert.AreEqual(DBNull.Value, c.DBNull);
|
||||
#endif
|
||||
}
|
||||
@@ -1611,7 +1611,7 @@ keyword such as type of business.""
|
||||
Assert.AreEqual("titleId", n.FidOrder[n.FidOrder.Count - 1]);
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[MetadataType(typeof(OptInClassMetadata))]
|
||||
public class OptInClass
|
||||
{
|
||||
@@ -2162,7 +2162,7 @@ Path '', line 1, position 1.",
|
||||
});
|
||||
}
|
||||
|
||||
#if !(NET35 || NET20)
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
[Test]
|
||||
public void CannotDeserializeArrayIntoDynamic()
|
||||
{
|
||||
@@ -3007,7 +3007,7 @@ Path '', line 1, position 2.",
|
||||
Assert.AreEqual("value", newModelStateDictionary["key"]);
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
public class ISerializableTestObject : ISerializable
|
||||
{
|
||||
internal string _stringValue;
|
||||
@@ -3504,7 +3504,7 @@ To fix this error either change the environment to be fully trusted, change the
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NET20 || SILVERLIGHT)
|
||||
#if !(NET20 || SILVERLIGHT || PORTABLE40)
|
||||
[Test]
|
||||
public void SerializeDeserializeXNodeProperties()
|
||||
{
|
||||
@@ -3535,7 +3535,7 @@ To fix this error either change the environment to be fully trusted, change the
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void SerializeDeserializeXmlNodeProperties()
|
||||
{
|
||||
@@ -4391,7 +4391,7 @@ To fix this error either change the environment to be fully trusted, change the
|
||||
}", json);
|
||||
}
|
||||
|
||||
#if !(NET35 || NET20)
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
[Test]
|
||||
public void SerializeExpandoObject()
|
||||
{
|
||||
@@ -5396,7 +5396,7 @@ To fix this error either change the environment to be fully trusted, change the
|
||||
}
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || WINDOWS_PHONE || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || WINDOWS_PHONE || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void SerializeException1()
|
||||
{
|
||||
@@ -5526,7 +5526,7 @@ To fix this error either change the environment to be fully trusted, change the
|
||||
}
|
||||
}
|
||||
|
||||
#if !(NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE)
|
||||
#if !(NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void DeserializeConcurrentDictionary()
|
||||
{
|
||||
@@ -6474,7 +6474,7 @@ Parameter name: value",
|
||||
Assert.AreEqual("", s);
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void SerializeAndDeserializeWithAttributes()
|
||||
{
|
||||
@@ -6640,7 +6640,7 @@ Parameter name: value",
|
||||
});
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void DeserializeException()
|
||||
{
|
||||
@@ -6678,7 +6678,7 @@ Parameter name: value",
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
[Test]
|
||||
public void AdditionalContentAfterFinish()
|
||||
{
|
||||
ExceptionAssert.Throws<JsonException>(
|
||||
@@ -6896,7 +6896,7 @@ Parameter name: value",
|
||||
Assert.AreEqual("[1.1,0.0,0.0]", json);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || NET40 || SILVERLIGHT)
|
||||
#if !(NET20 || NET35 || NET40 || SILVERLIGHT || PORTABLE40)
|
||||
#if !PORTABLE
|
||||
[Test]
|
||||
public void DeserializeReadOnlyListWithBigInteger()
|
||||
@@ -6958,7 +6958,7 @@ Parameter name: value",
|
||||
obj = JsonConvert.DeserializeObject<MyTuple<int>>(json);
|
||||
};
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
doStuff();
|
||||
Assert.AreEqual(500, obj.Item1);
|
||||
#else
|
||||
@@ -6991,7 +6991,7 @@ Parameter name: value",
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || NET35 || NET20)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || NET35 || NET20 || PORTABLE40)
|
||||
[Test]
|
||||
public void SerializeTupleWithSerializableAttribute()
|
||||
{
|
||||
@@ -7679,7 +7679,7 @@ Parameter name: value",
|
||||
}", json);
|
||||
}
|
||||
|
||||
#if !(PORTABLE || NET35 || NET20 || SILVERLIGHT)
|
||||
#if !(PORTABLE || NET35 || NET20 || SILVERLIGHT || PORTABLE40)
|
||||
[Test]
|
||||
public void ReadTooLargeInteger()
|
||||
{
|
||||
@@ -7773,7 +7773,7 @@ Parameter name: value",
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(PORTABLE || NET20 || NET35)
|
||||
#if !(NET20 || NET35 || PORTABLE40)
|
||||
[Test]
|
||||
public void HashSetInterface()
|
||||
{
|
||||
@@ -7846,7 +7846,7 @@ Parameter name: value",
|
||||
Assert.AreEqual(1234567890.123456m, d);
|
||||
}
|
||||
|
||||
#if !(PORTABLE || SILVERLIGHT || NETFX_CORE || WINDOWS_PHONE)
|
||||
#if !(PORTABLE || SILVERLIGHT || NETFX_CORE || WINDOWS_PHONE || PORTABLE40)
|
||||
[Test]
|
||||
public void DontSerializeStaticFields()
|
||||
{
|
||||
@@ -7880,7 +7880,7 @@ Parameter name: value",
|
||||
Assert.AreEqual("string!", l[0]);
|
||||
}
|
||||
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE)
|
||||
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void SerializeBigInteger()
|
||||
{
|
||||
@@ -7894,7 +7894,7 @@ Parameter name: value",
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE)
|
||||
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
|
||||
[Test]
|
||||
public void DeserializeReadOnlyListInterface()
|
||||
{
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}", json);
|
||||
}
|
||||
|
||||
#if !(PORTABLE || SILVERLIGHT || NETFX_CORE)
|
||||
#if !(PORTABLE || SILVERLIGHT || NETFX_CORE || PORTABLE40)
|
||||
public class MainClass : ISerializable
|
||||
{
|
||||
public ChildClass Child { get; set; }
|
||||
@@ -210,7 +210,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !(NET20 || NET35)
|
||||
#if !(NET20 || NET35 || PORTABLE40)
|
||||
public class DictionaryDynamicObject : DynamicObject
|
||||
{
|
||||
public IDictionary<string, object> Values { get; private set; }
|
||||
|
||||
@@ -612,7 +612,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
Assert.AreEqual(@"Unexpected end when deserializing object. Path 'events2.code', line 1, position 49.", errors[1]);
|
||||
}
|
||||
|
||||
#if !(NET35 || NET20)
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
[Test]
|
||||
public void ErrorHandlingEndOfContentDynamic()
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
[TestFixture]
|
||||
public class TraceWriterTests : TestFixtureBase
|
||||
{
|
||||
#if !(SILVERLIGHT || PORTABLE || NETFX_CORE)
|
||||
#if !(SILVERLIGHT || PORTABLE || NETFX_CORE || PORTABLE40)
|
||||
[Test]
|
||||
public void DiagnosticsTraceWriterTest()
|
||||
{
|
||||
@@ -458,7 +458,7 @@ Newtonsoft.Json Error: 0 : Error!
|
||||
Assert.AreEqual("Finished deserializing System.Collections.Generic.List`1[System.Object]. Path '$values', line 17, position 4.", traceWriter.TraceRecords[9].Message);
|
||||
}
|
||||
|
||||
#if !(NETFX_CORE || PORTABLE || SILVERLIGHT)
|
||||
#if !(NETFX_CORE || PORTABLE || SILVERLIGHT || PORTABLE40)
|
||||
[Test]
|
||||
public void DeserializeISerializable()
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !PORTABLE
|
||||
#if !(PORTABLE || PORTABLE40)
|
||||
#if !(NET35 || NET20 || PORTABLE)
|
||||
using System.Dynamic;
|
||||
#endif
|
||||
@@ -1445,7 +1445,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
Assert.AreEqual(1, (int)j["MyProperty"]);
|
||||
}
|
||||
|
||||
#if !(NET35 || NET20)
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
[Test]
|
||||
public void PropertyItemTypeNameHandlingDynamic()
|
||||
{
|
||||
@@ -1651,7 +1651,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
public TypeNameHandlingTestObject Data { get; set; }
|
||||
}
|
||||
|
||||
#if !(NET35 || NET20)
|
||||
#if !(NET35 || NET20 || PORTABLE40)
|
||||
public class PropertyItemTypeNameHandlingDynamic
|
||||
{
|
||||
[JsonProperty(ItemTypeNameHandling = TypeNameHandling.All)]
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
nonSerializedField = "Error"
|
||||
};
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || NET20 || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || NET20 || PORTABLE || PORTABLE40)
|
||||
MemoryStream ms = new MemoryStream();
|
||||
DataContractJsonSerializer dataContractJsonSerializer = new DataContractJsonSerializer(typeof(SerializableType));
|
||||
dataContractJsonSerializer.WriteObject(ms, serializableType);
|
||||
@@ -74,17 +74,17 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
string json = JsonConvert.SerializeObject(serializableType, new JsonSerializerSettings
|
||||
{
|
||||
ContractResolver = new DefaultContractResolver
|
||||
{
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
{
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
IgnoreSerializableAttribute = false
|
||||
#endif
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Assert.AreEqual(expected, json);
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Test]
|
||||
public void SerializeInheritedType()
|
||||
{
|
||||
@@ -114,7 +114,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[Serializable]
|
||||
#else
|
||||
[JsonObject(MemberSerialization.Fields)]
|
||||
@@ -144,7 +144,7 @@ namespace Newtonsoft.Json.Tests.Serialization
|
||||
}
|
||||
}
|
||||
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
|
||||
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
|
||||
[NonSerialized]
|
||||
#else
|
||||
[JsonIgnore]
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !(SILVERLIGHT || PORTABLE || NETFX_CORE)
|
||||
#if !(SILVERLIGHT || PORTABLE || NETFX_CORE || PORTABLE40)
|
||||
using System;
|
||||
using System.Reflection;
|
||||
#if !NETFX_CORE
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
#endregion
|
||||
|
||||
#if !PORTABLE
|
||||
#if !(PORTABLE || PORTABLE40)
|
||||
using global::System;
|
||||
using global::System.Collections.Generic;
|
||||
using global::System.Runtime.Serialization.Formatters;
|
||||
|
||||
Reference in New Issue
Block a user