-Readded .NET 4, SL4, WP7, Win8 portable library

-Disable SL library build
This commit is contained in:
James Newton-King
2013-04-06 11:38:01 +13:00
parent cb7ac1dfb4
commit 032bf82e0a
92 changed files with 409 additions and 347 deletions
@@ -27,7 +27,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
using System.Dynamic;
#endif
using System.Diagnostics;
@@ -148,12 +148,12 @@ namespace Newtonsoft.Json.Serialization
JsonDictionaryContract dictionaryContract = (JsonDictionaryContract) valueContract;
SerializeDictionary(writer, (value is IDictionary) ? (IDictionary) value : dictionaryContract.CreateWrapper(value), dictionaryContract, member, containerContract, containerProperty);
break;
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
case JsonContractType.Dynamic:
SerializeDynamic(writer, (IDynamicMetaObjectProvider)value, (JsonDynamicContract)valueContract, member, containerContract, containerProperty);
break;
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
case JsonContractType.Serializable:
SerializeISerializable(writer, (ISerializable)value, (JsonISerializableContract)valueContract, member, containerContract, containerProperty);
break;
@@ -292,7 +292,7 @@ namespace Newtonsoft.Json.Serialization
internal static bool TryConvertToString(object value, Type type, out string s)
{
#if !(NETFX_CORE || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
TypeConverter converter = ConvertUtils.GetConverter(type);
// use the objectType's TypeConverter if it has one and can convert to a string
@@ -671,7 +671,7 @@ namespace Newtonsoft.Json.Serialization
return writeMetadataObject;
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35)
[SecuritySafeCritical]
#endif
@@ -709,7 +709,7 @@ To fix this error either change the environment to be fully trusted, change the
}
#endif
#if !(NET35 || NET20)
#if !(NET35 || NET20 || PORTABLE40)
private void SerializeDynamic(JsonWriter writer, IDynamicMetaObjectProvider value, JsonDynamicContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
{
OnSerializing(writer, contract, value);