-Fixed WinRT
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user