-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
@@ -31,7 +31,7 @@ namespace Newtonsoft.Json.Schema
/// <summary>
/// Returns detailed information about the schema exception.
/// </summary>
#if !(SILVERLIGHT || WINDOWS_PHONE || NETFX_CORE)
#if !(SILVERLIGHT || WINDOWS_PHONE || NETFX_CORE || PORTABLE)
[Serializable]
#endif
public class JsonSchemaException : Exception
@@ -83,7 +83,7 @@ namespace Newtonsoft.Json.Schema
{
}
#if !(WINDOWS_PHONE || SILVERLIGHT || NETFX_CORE)
#if !(WINDOWS_PHONE || SILVERLIGHT || NETFX_CORE || PORTABLE)
/// <summary>
/// Initializes a new instance of the <see cref="JsonSchemaException"/> class.
/// </summary>
@@ -182,7 +182,7 @@ namespace Newtonsoft.Json.Schema
if (containerAttribute != null && !string.IsNullOrEmpty(containerAttribute.Description))
return containerAttribute.Description;
#if !PocketPC && !NETFX_CORE
#if !(NETFX_CORE || PORTABLE)
DescriptionAttribute descriptionAttribute = ReflectionUtils.GetAttribute<DescriptionAttribute>(type);
if (descriptionAttribute != null)
return descriptionAttribute.Description;
@@ -330,14 +330,14 @@ namespace Newtonsoft.Json.Schema
}
}
break;
#if !SILVERLIGHT && !PocketPC && !NETFX_CORE
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
case JsonContractType.Serializable:
CurrentSchema.Type = AddNullType(JsonSchemaType.Object, valueRequired);
CurrentSchema.Id = GetTypeId(type, false);
GenerateISerializableContract(type, (JsonISerializableContract) contract);
break;
#endif
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20 || WINDOWS_PHONE || PORTABLE)
case JsonContractType.Dynamic:
#endif
case JsonContractType.Linq:
@@ -389,7 +389,7 @@ namespace Newtonsoft.Json.Schema
CurrentSchema.AllowAdditionalProperties = false;
}
#if !SILVERLIGHT && !PocketPC && !NETFX_CORE
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
private void GenerateISerializableContract(Type type, JsonISerializableContract contract)
{
CurrentSchema.AllowAdditionalProperties = true;
@@ -430,7 +430,7 @@ namespace Newtonsoft.Json.Schema
case TypeCode.Empty:
case TypeCode.Object:
return schemaType | JsonSchemaType.String;
#if !NETFX_CORE
#if !(NETFX_CORE || PORTABLE)
case TypeCode.DBNull:
return schemaType | JsonSchemaType.Null;
#endif