-Readded .NET 4, SL4, WP7, Win8 portable library
-Disable SL library build
This commit is contained in:
+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]
|
||||
|
||||
Reference in New Issue
Block a user