-Fixed WinRT

This commit is contained in:
James Newton-King
2013-03-11 20:26:25 +13:00
parent 63977c8679
commit 7127b1a070
3 changed files with 9 additions and 2 deletions
@@ -398,6 +398,7 @@ namespace Newtonsoft.Json.Tests.Linq
}
#endif
#if !NETFX_CORE
[Test]
public void ConvertsToBoolean()
{
@@ -537,5 +538,6 @@ namespace Newtonsoft.Json.Tests.Linq
Assert.AreEqual(TypeCode.Object, v.GetTypeCode());
}
#endif
}
}
@@ -4904,7 +4904,7 @@ To fix this error either change the environment to be fully trusted, change the
JsonConvert.DeserializeObject<EnumerableArrayPropertyClass>(json);
}
#if !NET20
#if !(NET20 || SILVERLIGHT)
[DataContract]
public class BaseDataContract
{
+6 -1
View File
@@ -37,7 +37,10 @@ namespace Newtonsoft.Json.Linq
/// <summary>
/// Represents a value in JSON (string, integer, date, etc).
/// </summary>
public class JValue : JToken, IEquatable<JValue>, IFormattable, IComparable, IComparable<JValue>, IConvertible
public class JValue : JToken, IEquatable<JValue>, IFormattable, IComparable, IComparable<JValue>
#if !(NETFX_CORE)
, IConvertible
#endif
{
private JTokenType _valueType;
private object _value;
@@ -831,6 +834,7 @@ namespace Newtonsoft.Json.Linq
return Compare(_valueType, _value, obj._value);
}
#if !(NETFX_CORE)
TypeCode IConvertible.GetTypeCode()
{
if (_value == null)
@@ -918,5 +922,6 @@ namespace Newtonsoft.Json.Linq
{
return Convert.ChangeType(_value, conversionType, provider);
}
#endif
}
}