Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/Newtonsoft.Json.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Newton-King <james@newtonking.com>2012-03-15 10:36:29 +0400
committerJames Newton-King <james@newtonking.com>2012-03-15 10:36:29 +0400
commit9c7fb730f2774d116398f0dcc045b0c386b19a6b (patch)
tree388693609d60bae76de5793394987a658cb37a4c
parent5800e97ff36d3dacea20ec75e80ebfa5f76100cd (diff)
-Fixed Metro build
-rw-r--r--Src/Newtonsoft.Json/JsonConvert.cs4
-rw-r--r--Src/Newtonsoft.Json/JsonWriter.cs2
-rw-r--r--Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs2
-rw-r--r--Src/Newtonsoft.Json/Utilities/TypeExtensions.cs2
4 files changed, 9 insertions, 1 deletions
diff --git a/Src/Newtonsoft.Json/JsonConvert.cs b/Src/Newtonsoft.Json/JsonConvert.cs
index d840564..99bb8f6 100644
--- a/Src/Newtonsoft.Json/JsonConvert.cs
+++ b/Src/Newtonsoft.Json/JsonConvert.cs
@@ -584,8 +584,10 @@ namespace Newtonsoft.Json
return ToString(convertible.ToDateTime(CultureInfo.InvariantCulture));
case TypeCode.Decimal:
return ToString(convertible.ToDecimal(CultureInfo.InvariantCulture));
+#if !NETFX_CORE
case TypeCode.DBNull:
return Null;
+#endif
}
}
#if !PocketPC && !NET20
@@ -629,7 +631,9 @@ namespace Newtonsoft.Json
case TypeCode.Double:
case TypeCode.DateTime:
case TypeCode.Decimal:
+#if !NETFX_CORE
case TypeCode.DBNull:
+#endif
return true;
default:
return false;
diff --git a/Src/Newtonsoft.Json/JsonWriter.cs b/Src/Newtonsoft.Json/JsonWriter.cs
index cd3f709..9882f4f 100644
--- a/Src/Newtonsoft.Json/JsonWriter.cs
+++ b/Src/Newtonsoft.Json/JsonWriter.cs
@@ -1211,9 +1211,11 @@ namespace Newtonsoft.Json
case TypeCode.Decimal:
WriteValue(convertible.ToDecimal(CultureInfo.InvariantCulture));
return;
+#if !NETFX_CORE
case TypeCode.DBNull:
WriteNull();
return;
+#endif
}
}
#if !PocketPC && !NET20
diff --git a/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs b/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs
index 6615660..6f623e5 100644
--- a/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs
+++ b/Src/Newtonsoft.Json/Schema/JsonSchemaGenerator.cs
@@ -427,8 +427,10 @@ namespace Newtonsoft.Json.Schema
case TypeCode.Empty:
case TypeCode.Object:
return schemaType | JsonSchemaType.String;
+#if !NETFX_CORE
case TypeCode.DBNull:
return schemaType | JsonSchemaType.Null;
+#endif
case TypeCode.Boolean:
return schemaType | JsonSchemaType.Boolean;
case TypeCode.Char:
diff --git a/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs b/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs
index 7d761f9..b059a39 100644
--- a/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs
+++ b/Src/Newtonsoft.Json/Utilities/TypeExtensions.cs
@@ -189,7 +189,7 @@ namespace Newtonsoft.Json.Utilities
{
if (name != null && name != m.Name)
return false;
- if (m.GetMemberType() != memberType)
+ if (m.MemberType() != memberType)
return false;
if (!TestAccessibility(m, bindingFlags))
return false;