-Removed SL/WP code and fiels

This commit is contained in:
James Newton-King
2013-10-20 16:41:15 +13:00
parent bcd6982419
commit 44bc7ea246
104 changed files with 371 additions and 1633 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
#endif
using System.Text;
@@ -228,7 +228,7 @@ namespace Newtonsoft.Json.Bson
/// <param name="value">The <see cref="Object"/> value to write.</param>
public override void WriteValue(object value)
{
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
if (value is BigInteger)
{
InternalWriteValue(JsonToken.Integer);
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
using System;
using System.Data.SqlTypes;
using System.Globalization;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
using System;
using System.Data;
using Newtonsoft.Json.Serialization;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
using System;
using System.Data;
using Newtonsoft.Json.Serialization;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
using System;
using Newtonsoft.Json.Serialization;
using System.Globalization;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if (!(SILVERLIGHT) || WINDOWS_PHONE) && !PORTABLE40
#if !PORTABLE40
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -43,7 +43,7 @@ namespace Newtonsoft.Json.Converters
{
#region XmlNodeWrappers
#if !SILVERLIGHT && !NETFX_CORE && !PORTABLE && !PORTABLE40
#if !NETFX_CORE && !PORTABLE && !PORTABLE40
internal class XmlDocumentWrapper : XmlNodeWrapper, IXmlDocument
{
private readonly XmlDocument _document;
@@ -799,7 +799,7 @@ namespace Newtonsoft.Json.Converters
if (value is XObject)
return XContainerWrapper.WrapNode((XObject)value);
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
#if !(NETFX_CORE || PORTABLE)
if (value is XmlNode)
return new XmlNodeWrapper((XmlNode)value);
#endif
@@ -1092,7 +1092,7 @@ namespace Newtonsoft.Json.Converters
rootNode = document;
}
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
#if !(NETFX_CORE || PORTABLE)
if (typeof(XmlNode).IsAssignableFrom(objectType))
{
if (objectType != typeof(XmlDocument))
@@ -1555,7 +1555,7 @@ namespace Newtonsoft.Json.Converters
if (typeof(XObject).IsAssignableFrom(valueType))
return true;
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE)
#if !(NETFX_CORE || PORTABLE)
if (typeof(XmlNode).IsAssignableFrom(valueType))
return true;
#endif
@@ -1,5 +1,5 @@

#if SILVERLIGHT || PocketPC || NETFX_CORE || PORTABLE40 || PORTABLE
#if PocketPC || NETFX_CORE || PORTABLE40 || PORTABLE
namespace System.Runtime.Serialization.Formatters
{
+10 -10
View File
@@ -26,10 +26,10 @@
using System;
using System.IO;
using System.Globalization;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
#endif
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
using System.Threading.Tasks;
#endif
using Newtonsoft.Json.Linq;
@@ -38,7 +38,7 @@ using System.Xml;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using System.Text;
#if !NET20 && (!SILVERLIGHT || WINDOWS_PHONE) && !PORTABLE40
#if !(NET20 || PORTABLE40)
using System.Xml.Linq;
#endif
@@ -238,7 +238,7 @@ namespace Newtonsoft.Json
return value.ToString(null, CultureInfo.InvariantCulture);
}
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
private static string ToStringInternal(BigInteger value)
{
return value.ToString(null, CultureInfo.InvariantCulture);
@@ -482,7 +482,7 @@ namespace Newtonsoft.Json
return ToString((Uri)value);
case PrimitiveTypeCode.TimeSpan:
return ToString((TimeSpan)value);
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
case PrimitiveTypeCode.BigInteger:
return ToStringInternal((BigInteger)value);
#endif
@@ -602,7 +602,7 @@ namespace Newtonsoft.Json
return sw.ToString();
}
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
/// <summary>
/// Asynchronously serializes the specified object to a JSON string.
/// Serialization will happen on a new thread.
@@ -798,7 +798,7 @@ namespace Newtonsoft.Json
return jsonSerializer.Deserialize(new JsonTextReader(sr), type);
}
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
/// <summary>
/// Asynchronously deserializes the JSON to the specified .NET type.
/// Deserialization will happen on a new thread.
@@ -897,7 +897,7 @@ namespace Newtonsoft.Json
}
}
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
/// <summary>
/// Asynchronously populates the object with values from the JSON string using <see cref="JsonSerializerSettings"/>.
/// </summary>
@@ -916,7 +916,7 @@ namespace Newtonsoft.Json
}
#endif
#if !(SILVERLIGHT || PORTABLE40 || PORTABLE || NETFX_CORE)
#if !(PORTABLE40 || PORTABLE || NETFX_CORE)
/// <summary>
/// Serializes the XML node to a JSON string.
/// </summary>
@@ -996,7 +996,7 @@ namespace Newtonsoft.Json
}
#endif
#if !NET20 && (!(SILVERLIGHT) || WINDOWS_PHONE) && !PORTABLE40
#if !NET20 && !PORTABLE40
/// <summary>
/// Serializes the <see cref="XNode"/> to a JSON string.
/// </summary>
+2 -2
View File
@@ -35,7 +35,7 @@ namespace Newtonsoft.Json
/// <summary>
/// The exception thrown when an error occurs during Json serialization or deserialization.
/// </summary>
#if !(SILVERLIGHT || WINDOWS_PHONE || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
[Serializable]
#endif
public class JsonException : Exception
@@ -68,7 +68,7 @@ namespace Newtonsoft.Json
{
}
#if !(WINDOWS_PHONE || SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
/// <summary>
/// Initializes a new instance of the <see cref="JsonException"/> class.
/// </summary>
+2 -2
View File
@@ -33,7 +33,7 @@ namespace Newtonsoft.Json
/// <summary>
/// The exception thrown when an error occurs while reading Json text.
/// </summary>
#if !(SILVERLIGHT || WINDOWS_PHONE || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
[Serializable]
#endif
public class JsonReaderException : JsonException
@@ -84,7 +84,7 @@ namespace Newtonsoft.Json
{
}
#if !(WINDOWS_PHONE || SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
/// <summary>
/// Initializes a new instance of the <see cref="JsonReaderException"/> class.
/// </summary>
@@ -33,7 +33,7 @@ namespace Newtonsoft.Json
/// <summary>
/// The exception thrown when an error occurs during Json serialization or deserialization.
/// </summary>
#if !(SILVERLIGHT || WINDOWS_PHONE || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
[Serializable]
#endif
public class JsonSerializationException : JsonException
@@ -66,7 +66,7 @@ namespace Newtonsoft.Json
{
}
#if !(WINDOWS_PHONE || SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
/// <summary>
/// Initializes a new instance of the <see cref="JsonSerializationException"/> class.
/// </summary>
+2 -2
View File
@@ -26,7 +26,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
#endif
using System.Text;
@@ -1266,7 +1266,7 @@ namespace Newtonsoft.Json
}
else if (parseResult == ParseResult.Overflow)
{
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
string number = _stringReference.ToString();
numberValue = BigInteger.Parse(number, CultureInfo.InvariantCulture);
numberType = JsonToken.Integer;
+2 -2
View File
@@ -26,7 +26,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
#endif
using System.Text;
@@ -311,7 +311,7 @@ namespace Newtonsoft.Json
/// <param name="value">The <see cref="Object"/> value to write.</param>
public override void WriteValue(object value)
{
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
if (value is BigInteger)
{
InternalWriteValue(JsonToken.Integer);
+2 -2
View File
@@ -25,7 +25,7 @@
using System;
using System.Collections.Generic;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
#endif
using Newtonsoft.Json.Linq;
@@ -735,7 +735,7 @@ namespace Newtonsoft.Json
if (schema.DivisibleBy != null)
{
bool notDivisible;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (value is BigInteger)
{
// not that this will lose any decimal point on DivisibleBy
+4 -4
View File
@@ -26,7 +26,7 @@
using System;
using System.Collections.Generic;
using System.IO;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
#endif
using Newtonsoft.Json.Utilities;
@@ -493,7 +493,7 @@ namespace Newtonsoft.Json
WriteComment((reader.Value != null) ? reader.Value.ToString() : null);
break;
case JsonToken.Integer:
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
if (reader.Value is BigInteger)
{
WriteValue((BigInteger)reader.Value);
@@ -1219,7 +1219,7 @@ namespace Newtonsoft.Json
}
else
{
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
// this is here because adding a WriteValue(BigInteger) to JsonWriter will
// mean the user has to add a reference to System.Numerics.dll
if (value is BigInteger)
@@ -1368,7 +1368,7 @@ namespace Newtonsoft.Json
case PrimitiveTypeCode.TimeSpanNullable:
writer.WriteValue((value == null) ? (TimeSpan?)null : (TimeSpan)value);
break;
#if !(PORTABLE || PORTABLE40 || NET35 || NET20 || WINDOWS_PHONE || SILVERLIGHT)
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
case PrimitiveTypeCode.BigInteger:
// this will call to WriteValue(object)
writer.WriteValue((BigInteger)value);
+2 -2
View File
@@ -33,7 +33,7 @@ namespace Newtonsoft.Json
/// <summary>
/// The exception thrown when an error occurs while reading Json text.
/// </summary>
#if !(SILVERLIGHT || WINDOWS_PHONE || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
[Serializable]
#endif
public class JsonWriterException : JsonException
@@ -72,7 +72,7 @@ namespace Newtonsoft.Json
{
}
#if !(WINDOWS_PHONE || SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
/// <summary>
/// Initializes a new instance of the <see cref="JsonWriterException"/> class.
/// </summary>
+1 -1
View File
@@ -32,7 +32,7 @@ namespace Newtonsoft.Json.Linq
/// </summary>
/// <typeparam name="T">The type of token</typeparam>
public interface IJEnumerable<
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
out
#endif
T> : IEnumerable<T> where T : JToken
+16 -16
View File
@@ -46,17 +46,17 @@ namespace Newtonsoft.Json.Linq
/// Represents a token that can contain other tokens.
/// </summary>
public abstract class JContainer : JToken, IList<JToken>
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
, ITypedList, IBindingList
#elif PORTABLE
, INotifyCollectionChanged
#endif
, IList
#if !(SILVERLIGHT || NET20 || NET35 || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || NETFX_CORE || PORTABLE40 || PORTABLE)
, INotifyCollectionChanged
#endif
{
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
internal ListChangedEventHandler _listChanged;
internal AddingNewEventHandler _addingNew;
@@ -78,7 +78,7 @@ namespace Newtonsoft.Json.Linq
remove { _addingNew -= value; }
}
#endif
#if SILVERLIGHT || !(NET20 || NET35 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
internal NotifyCollectionChangedEventHandler _collectionChanged;
/// <summary>
@@ -130,7 +130,7 @@ namespace Newtonsoft.Json.Linq
return new List<JToken>();
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
/// <summary>
/// Raises the <see cref="AddingNew"/> event.
/// </summary>
@@ -164,7 +164,7 @@ namespace Newtonsoft.Json.Linq
}
}
#endif
#if SILVERLIGHT || !(NET20 || NET35 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
/// <summary>
/// Raises the <see cref="CollectionChanged"/> event.
/// </summary>
@@ -357,11 +357,11 @@ namespace Newtonsoft.Json.Linq
ChildrenTokens.Insert(index, item);
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
if (_listChanged != null)
OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index));
#endif
#if SILVERLIGHT || !(NET20 || NET35 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
if (_collectionChanged != null)
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item, index));
#endif
@@ -391,11 +391,11 @@ namespace Newtonsoft.Json.Linq
ChildrenTokens.RemoveAt(index);
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
if (_listChanged != null)
OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, index));
#endif
#if SILVERLIGHT || !(NET20 || NET35 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
if (_collectionChanged != null)
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, item, index));
#endif
@@ -455,11 +455,11 @@ namespace Newtonsoft.Json.Linq
existing.Previous = null;
existing.Next = null;
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
if (_listChanged != null)
OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, index));
#endif
#if SILVERLIGHT || !(NET20 || NET35 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
if (_collectionChanged != null)
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, item, existing, index));
#endif
@@ -478,11 +478,11 @@ namespace Newtonsoft.Json.Linq
ChildrenTokens.Clear();
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
if (_listChanged != null)
OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
#endif
#if SILVERLIGHT || !(NET20 || NET35 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
if (_collectionChanged != null)
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset));
#endif
@@ -751,7 +751,7 @@ namespace Newtonsoft.Json.Linq
return hashCode;
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
string ITypedList.GetListName(PropertyDescriptor[] listAccessors)
{
return string.Empty;
@@ -920,7 +920,7 @@ namespace Newtonsoft.Json.Linq
#endregion
#region IBindingList Members
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
void IBindingList.AddIndex(PropertyDescriptor property)
{
}
+9 -9
View File
@@ -53,10 +53,10 @@ namespace Newtonsoft.Json.Linq
/// <code lang="cs" source="..\Src\Newtonsoft.Json.Tests\Documentation\LinqToJsonTests.cs" region="LinqToJsonCreateParse" title="Parsing a JSON Object from Text" />
/// </example>
public class JObject : JContainer, IDictionary<string, JToken>, INotifyPropertyChanged
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
, ICustomTypeDescriptor
#endif
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
, INotifyPropertyChanging
#endif
{
@@ -76,7 +76,7 @@ namespace Newtonsoft.Json.Linq
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NET20 || NETFX_CORE || PORTABLE || PORTABLE40)
/// <summary>
/// Occurs when a property value is changing.
/// </summary>
@@ -159,11 +159,11 @@ namespace Newtonsoft.Json.Linq
internal void InternalPropertyChanged(JProperty childProperty)
{
OnPropertyChanged(childProperty.Name);
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
if (_listChanged != null)
OnListChanged(new ListChangedEventArgs(ListChangedType.ItemChanged, IndexOfItem(childProperty)));
#endif
#if SILVERLIGHT || !(NET20 || NET35 || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE40)
if (_collectionChanged != null)
OnCollectionChanged(new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Replace, childProperty, childProperty, IndexOfItem(childProperty)));
#endif
@@ -171,7 +171,7 @@ namespace Newtonsoft.Json.Linq
internal void InternalPropertyChanging(JProperty childProperty)
{
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
OnPropertyChanging(childProperty.Name);
#endif
}
@@ -274,7 +274,7 @@ namespace Newtonsoft.Json.Linq
}
else
{
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
OnPropertyChanging(propertyName);
#endif
Add(new JProperty(propertyName, value));
@@ -584,7 +584,7 @@ namespace Newtonsoft.Json.Linq
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE || NET20)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE || NET20)
/// <summary>
/// Raises the <see cref="PropertyChanging"/> event with the provided arguments.
/// </summary>
@@ -596,7 +596,7 @@ namespace Newtonsoft.Json.Linq
}
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
// include custom type descriptor on JObject rather than use a provider because the properties are specific to a type
#region ICustomTypeDescriptor
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
using System;
using System.ComponentModel;
using Newtonsoft.Json.Utilities;
+33 -33
View File
@@ -30,7 +30,7 @@ using System.Dynamic;
using System.Linq.Expressions;
#endif
using System.IO;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
#endif
using System.Text;
@@ -51,7 +51,7 @@ namespace Newtonsoft.Json.Linq
/// Represents an abstract JSON token.
/// </summary>
public abstract class JToken : IJEnumerable<JToken>, IJsonLineInfo
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
, ICloneable
#endif
#if !(NET35 || NET20 || PORTABLE40)
@@ -456,7 +456,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, BooleanTypes, false))
throw new ArgumentException("Can not convert {0} to Boolean.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return Convert.ToBoolean((int)(BigInteger)v.Value);
#endif
@@ -498,7 +498,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, BooleanTypes, true))
throw new ArgumentException("Can not convert {0} to Boolean.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return Convert.ToBoolean((int)(BigInteger)v.Value);
#endif
@@ -517,7 +517,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to Int64.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (long)(BigInteger)v.Value;
#endif
@@ -586,7 +586,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to Decimal.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (decimal?)(BigInteger)v.Value;
#endif
@@ -608,7 +608,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to Double.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (double?)(BigInteger)v.Value;
#endif
@@ -630,7 +630,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, CharTypes, true))
throw new ArgumentException("Can not convert {0} to Char.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (char?)(BigInteger)v.Value;
#endif
@@ -649,7 +649,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to Int32.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (int)(BigInteger)v.Value;
#endif
@@ -668,7 +668,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to Int16.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (short)(BigInteger)v.Value;
#endif
@@ -688,7 +688,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to UInt16.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (ushort)(BigInteger)v.Value;
#endif
@@ -708,7 +708,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, CharTypes, false))
throw new ArgumentException("Can not convert {0} to Char.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (char)(BigInteger)v.Value;
#endif
@@ -727,7 +727,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to Byte.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (byte)(BigInteger)v.Value;
#endif
@@ -747,7 +747,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to SByte.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (sbyte)(BigInteger)v.Value;
#endif
@@ -769,7 +769,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to Int32.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (int?)(BigInteger)v.Value;
#endif
@@ -791,7 +791,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to Int16.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (short?)(BigInteger)v.Value;
#endif
@@ -814,7 +814,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to UInt16.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (ushort?)(BigInteger)v.Value;
#endif
@@ -836,7 +836,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to Byte.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (byte?)(BigInteger)v.Value;
#endif
@@ -859,7 +859,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to SByte.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (sbyte?)(BigInteger)v.Value;
#endif
@@ -900,7 +900,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to Int64.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (long?)(BigInteger)v.Value;
#endif
@@ -922,7 +922,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to Single.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (float?)(BigInteger)v.Value;
#endif
@@ -941,7 +941,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to Decimal.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (decimal)(BigInteger)v.Value;
#endif
@@ -964,7 +964,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to UInt32.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (uint?)(BigInteger)v.Value;
#endif
@@ -987,7 +987,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, true))
throw new ArgumentException("Can not convert {0} to UInt64.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (ulong?)(BigInteger)v.Value;
#endif
@@ -1006,7 +1006,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to Double.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (double)(BigInteger)v.Value;
#endif
@@ -1025,7 +1025,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to Single.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (float)(BigInteger)v.Value;
#endif
@@ -1051,7 +1051,7 @@ namespace Newtonsoft.Json.Linq
return null;
if (v.Value is byte[])
return Convert.ToBase64String((byte[])v.Value);
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return ((BigInteger)v.Value).ToString(CultureInfo.InvariantCulture);
#endif
@@ -1071,7 +1071,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to UInt32.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (uint)(BigInteger)v.Value;
#endif
@@ -1091,7 +1091,7 @@ namespace Newtonsoft.Json.Linq
if (v == null || !ValidateToken(v, NumberTypes, false))
throw new ArgumentException("Can not convert {0} to UInt64.".FormatWith(CultureInfo.InvariantCulture, GetType(value)));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return (ulong)(BigInteger)v.Value;
#endif
@@ -1115,7 +1115,7 @@ namespace Newtonsoft.Json.Linq
if (v.Value is string)
return Convert.FromBase64String(Convert.ToString(v.Value, CultureInfo.InvariantCulture));
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (v.Value is BigInteger)
return ((BigInteger)v.Value).ToByteArray();
#endif
@@ -1220,7 +1220,7 @@ namespace Newtonsoft.Json.Linq
return (v.Value is Uri) ? (Uri)v.Value : new Uri(Convert.ToString(v.Value, CultureInfo.InvariantCulture));
}
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
private static BigInteger ToBigInteger(JToken value)
{
JValue v = EnsureValue(value);
@@ -1769,7 +1769,7 @@ namespace Newtonsoft.Json.Linq
return (TimeSpan?)this;
case PrimitiveTypeCode.TimeSpan:
return (TimeSpan)this;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
case PrimitiveTypeCode.BigIntegerNullable:
return ToBigIntegerNullable(this);
case PrimitiveTypeCode.BigInteger:
@@ -1963,7 +1963,7 @@ namespace Newtonsoft.Json.Linq
}
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
object ICloneable.Clone()
{
return DeepClone();
+2 -2
View File
@@ -25,7 +25,7 @@
using System;
using System.Globalization;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
#endif
using Newtonsoft.Json.Utilities;
@@ -188,7 +188,7 @@ namespace Newtonsoft.Json.Linq
/// <param name="value">The <see cref="Object"/> value to write.</param>
public override void WriteValue(object value)
{
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
if (value is BigInteger)
{
InternalWriteValue(JsonToken.Integer);
+8 -8
View File
@@ -31,7 +31,7 @@ using System.Globalization;
using System.Dynamic;
using System.Linq.Expressions;
#endif
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
#endif
@@ -195,7 +195,7 @@ namespace Newtonsoft.Json.Linq
get { return false; }
}
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
private static int CompareBigInteger(BigInteger i1, object i2)
{
int result = i1.CompareTo(ConvertUtils.ToBigInteger(i2));
@@ -232,7 +232,7 @@ namespace Newtonsoft.Json.Linq
switch (valueType)
{
case JTokenType.Integer:
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (objA is BigInteger)
return CompareBigInteger((BigInteger)objA, objB);
if (objB is BigInteger)
@@ -245,7 +245,7 @@ namespace Newtonsoft.Json.Linq
else
return Convert.ToInt64(objA, CultureInfo.InvariantCulture).CompareTo(Convert.ToInt64(objB, CultureInfo.InvariantCulture));
case JTokenType.Float:
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (objA is BigInteger)
return CompareBigInteger((BigInteger)objA, objB);
if (objB is BigInteger)
@@ -360,7 +360,7 @@ namespace Newtonsoft.Json.Linq
}
}
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (objA is BigInteger || objB is BigInteger)
{
if (objA == null || objB == null)
@@ -536,7 +536,7 @@ namespace Newtonsoft.Json.Linq
return JTokenType.Integer;
else if (value is Enum)
return JTokenType.Integer;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
else if (value is BigInteger)
return JTokenType.Integer;
#endif
@@ -638,7 +638,7 @@ namespace Newtonsoft.Json.Linq
writer.WriteUndefined();
return;
case JTokenType.Integer:
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (_value is BigInteger)
writer.WriteValue((BigInteger)_value);
else
@@ -930,7 +930,7 @@ namespace Newtonsoft.Json.Linq
if (_value is DateTimeOffset)
return TypeCode.DateTime;
#endif
#if !(NET20 || NET35 || PORTABLE40 || SILVERLIGHT)
#if !(NET20 || NET35 || PORTABLE40)
if (_value is BigInteger)
return TypeCode.Object;
#endif
@@ -1,287 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DC3C6F3D-2CA1-4278-9B79-63770FB3EA2D}</ProjectGuid>
<ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Newtonsoft.Json</RootNamespace>
<AssemblyName>Newtonsoft.Json</AssemblyName>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>false</ThrowErrorsInValidation>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug\Silverlight\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>Bin\Debug\Silverlight\Newtonsoft.Json.xml</DocumentationFile>
<CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\Release\Silverlight\</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>Bin\Release\Silverlight\Newtonsoft.Json.xml</DocumentationFile>
<CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="mscorlib" />
<Reference Include="system" />
<Reference Include="System.Core" />
<Reference Include="System.Windows" />
<Reference Include="System.Xml" />
<Reference Include="System.Net" />
</ItemGroup>
<ItemGroup>
<Compile Include="Bson\BsonBinaryType.cs" />
<Compile Include="Bson\BsonBinaryWriter.cs" />
<Compile Include="Bson\BsonObjectId.cs" />
<Compile Include="Bson\BsonReader.cs" />
<Compile Include="Bson\BsonToken.cs" />
<Compile Include="Bson\BsonType.cs" />
<Compile Include="Bson\BsonWriter.cs" />
<Compile Include="ConstructorHandling.cs" />
<Compile Include="Converters\BinaryConverter.cs" />
<Compile Include="Converters\BsonObjectIdConverter.cs" />
<Compile Include="Converters\CustomCreationConverter.cs" />
<Compile Include="Converters\DataSetConverter.cs" />
<Compile Include="Converters\DataTableConverter.cs" />
<Compile Include="Converters\DateTimeConverterBase.cs" />
<Compile Include="Converters\EntityKeyMemberConverter.cs" />
<Compile Include="Converters\ExpandoObjectConverter.cs" />
<Compile Include="Converters\IsoDateTimeConverter.cs" />
<Compile Include="Converters\JavaScriptDateTimeConverter.cs" />
<Compile Include="Converters\KeyValuePairConverter.cs" />
<Compile Include="Converters\RegexConverter.cs" />
<Compile Include="Converters\StringEnumConverter.cs" />
<Compile Include="Converters\VersionConverter.cs" />
<Compile Include="Converters\XmlNodeConverter.cs" />
<Compile Include="DateFormatHandling.cs" />
<Compile Include="DateParseHandling.cs" />
<Compile Include="DateTimeZoneHandling.cs" />
<Compile Include="FloatFormatHandling.cs" />
<Compile Include="FloatParseHandling.cs" />
<Compile Include="FormatterAssemblyStyle.cs" />
<Compile Include="DefaultValueHandling.cs" />
<Compile Include="Formatting.cs" />
<Compile Include="IJsonLineInfo.cs" />
<Compile Include="JsonArrayAttribute.cs" />
<Compile Include="JsonConstructorAttribute.cs" />
<Compile Include="JsonContainerAttribute.cs" />
<Compile Include="JsonConvert.cs" />
<Compile Include="JsonConverter.cs" />
<Compile Include="JsonConverterAttribute.cs" />
<Compile Include="JsonConverterCollection.cs" />
<Compile Include="JsonDictionaryAttribute.cs" />
<Compile Include="JsonException.cs" />
<Compile Include="JsonIgnoreAttribute.cs" />
<Compile Include="JsonObjectAttribute.cs" />
<Compile Include="JsonPosition.cs" />
<Compile Include="JsonPropertyAttribute.cs" />
<Compile Include="JsonReader.cs" />
<Compile Include="JsonReaderException.cs" />
<Compile Include="JsonSerializationException.cs" />
<Compile Include="JsonSerializer.cs" />
<Compile Include="JsonSerializerSettings.cs" />
<Compile Include="JsonTextReader.cs" />
<Compile Include="JsonTextWriter.cs" />
<Compile Include="JsonToken.cs" />
<Compile Include="JsonValidatingReader.cs" />
<Compile Include="JsonWriter.cs" />
<Compile Include="JsonWriterException.cs" />
<Compile Include="Linq\Extensions.cs" />
<Compile Include="Linq\IJEnumerable.cs" />
<Compile Include="Linq\JArray.cs" />
<Compile Include="Linq\JConstructor.cs" />
<Compile Include="Linq\JContainer.cs" />
<Compile Include="Linq\JEnumerable.cs" />
<Compile Include="Linq\JObject.cs" />
<Compile Include="Linq\JPath.cs" />
<Compile Include="Linq\JProperty.cs" />
<Compile Include="Linq\JPropertyDescriptor.cs" />
<Compile Include="Linq\JPropertyKeyedCollection.cs" />
<Compile Include="Linq\JRaw.cs" />
<Compile Include="Linq\JToken.cs" />
<Compile Include="Linq\JTokenEqualityComparer.cs" />
<Compile Include="Linq\JTokenReader.cs" />
<Compile Include="Linq\JTokenType.cs" />
<Compile Include="Linq\JTokenWriter.cs" />
<Compile Include="Linq\JValue.cs" />
<Compile Include="MemberSerialization.cs" />
<Compile Include="MissingMemberHandling.cs" />
<Compile Include="NullValueHandling.cs" />
<Compile Include="ObjectCreationHandling.cs" />
<Compile Include="PreserveReferencesHandling.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReferenceLoopHandling.cs" />
<Compile Include="Required.cs" />
<Compile Include="SerializationBinder.cs" />
<Compile Include="Serialization\CachedAttributeGetter.cs" />
<Compile Include="Serialization\CamelCasePropertyNamesContractResolver.cs" />
<Compile Include="Serialization\DefaultContractResolver.cs" />
<Compile Include="Serialization\DefaultReferenceResolver.cs" />
<Compile Include="Serialization\DefaultSerializationBinder.cs" />
<Compile Include="Serialization\DiagnosticsTraceWriter.cs" />
<Compile Include="Serialization\DynamicValueProvider.cs" />
<Compile Include="Serialization\ErrorContext.cs" />
<Compile Include="Serialization\ErrorEventArgs.cs" />
<Compile Include="Serialization\IContractResolver.cs" />
<Compile Include="Serialization\IReferenceResolver.cs" />
<Compile Include="Serialization\ITraceWriter.cs" />
<Compile Include="Serialization\IValueProvider.cs" />
<Compile Include="Serialization\JsonArrayContract.cs" />
<Compile Include="Serialization\JsonContainerContract.cs" />
<Compile Include="Serialization\JsonContract.cs" />
<Compile Include="Serialization\JsonDictionaryContract.cs" />
<Compile Include="Serialization\JsonDynamicContract.cs" />
<Compile Include="Serialization\JsonFormatterConverter.cs" />
<Compile Include="Serialization\JsonISerializableContract.cs" />
<Compile Include="Serialization\JsonLinqContract.cs" />
<Compile Include="Serialization\JsonObjectContract.cs" />
<Compile Include="Serialization\JsonPrimitiveContract.cs" />
<Compile Include="Serialization\JsonProperty.cs" />
<Compile Include="Serialization\JsonPropertyCollection.cs" />
<Compile Include="Serialization\JsonSerializerInternalBase.cs" />
<Compile Include="Serialization\JsonSerializerProxy.cs" />
<Compile Include="Serialization\JsonSerializerInternalReader.cs" />
<Compile Include="Serialization\JsonSerializerInternalWriter.cs" />
<Compile Include="Serialization\JsonStringContract.cs" />
<Compile Include="Serialization\LateBoundMetadataTypeAttribute.cs" />
<Compile Include="Serialization\MemoryTraceWriter.cs" />
<Compile Include="Serialization\ObjectConstructor.cs" />
<Compile Include="Serialization\OnErrorAttribute.cs" />
<Compile Include="Serialization\ReflectionValueProvider.cs" />
<Compile Include="StringEscapeHandling.cs" />
<Compile Include="TraceLevel.cs" />
<Compile Include="TypeNameHandling.cs" />
<Compile Include="Utilities\Base64Encoder.cs" />
<Compile Include="Utilities\BidirectionalDictionary.cs" />
<Compile Include="Utilities\CollectionUtils.cs" />
<Compile Include="Utilities\CollectionWrapper.cs" />
<Compile Include="Utilities\ConvertUtils.cs" />
<Compile Include="Utilities\DateTimeUtils.cs" />
<Compile Include="Utilities\DictionaryWrapper.cs" />
<Compile Include="Utilities\DynamicProxy.cs" />
<Compile Include="Utilities\DynamicProxyMetaObject.cs" />
<Compile Include="Utilities\DynamicReflectionDelegateFactory.cs" />
<Compile Include="Utilities\DynamicUtils.cs" />
<Compile Include="Utilities\DynamicWrapper.cs" />
<Compile Include="Utilities\EnumUtils.cs" />
<Compile Include="Utilities\EnumValue.cs" />
<Compile Include="Utilities\EnumValues.cs" />
<Compile Include="Utilities\ILGeneratorExtensions.cs" />
<Compile Include="Utilities\JavaScriptUtils.cs" />
<Compile Include="Utilities\LateBoundReflectionDelegateFactory.cs" />
<Compile Include="Utilities\ListWrapper.cs" />
<Compile Include="Utilities\MathUtils.cs" />
<Compile Include="Utilities\MethodCall.cs" />
<Compile Include="Utilities\MiscellaneousUtils.cs" />
<Compile Include="Utilities\ReflectionDelegateFactory.cs" />
<Compile Include="Utilities\ReflectionUtils.cs" />
<Compile Include="Utilities\StringBuffer.cs" />
<Compile Include="Utilities\StringReference.cs" />
<Compile Include="Utilities\StringUtils.cs" />
<Compile Include="Utilities\ThreadSafeStore.cs" />
<Compile Include="Utilities\TypeExtensions.cs" />
<Compile Include="Utilities\ValidationUtils.cs" />
<Compile Include="Schema\Extensions.cs" />
<Compile Include="Schema\JsonSchemaException.cs" />
<Compile Include="Schema\JsonSchemaModel.cs" />
<Compile Include="Schema\JsonSchemaModelBuilder.cs" />
<Compile Include="Schema\JsonSchemaNodeCollection.cs" />
<Compile Include="Schema\JsonSchemaNode.cs" />
<Compile Include="Schema\JsonSchemaWriter.cs" />
<Compile Include="Schema\UndefinedSchemaIdHandling.cs" />
<Compile Include="Schema\ValidationEventArgs.cs" />
<Compile Include="Schema\ValidationEventHandler.cs" />
<Compile Include="Schema\JsonSchema.cs" />
<Compile Include="Schema\JsonSchemaBuilder.cs" />
<Compile Include="Schema\JsonSchemaConstants.cs" />
<Compile Include="Schema\JsonSchemaGenerator.cs" />
<Compile Include="Schema\JsonSchemaResolver.cs" />
<Compile Include="Schema\JsonSchemaType.cs" />
<Compile Include="Serialization\JsonTypeReflector.cs" />
<Compile Include="WriteState.cs" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ProjectExtensions>
<VisualStudio>
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
<SilverlightProjectProperties />
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project>
@@ -1,236 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7A7F70AB-5C07-47ED-BDD2-ECC14DBACA5E}</ProjectGuid>
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Newtonsoft.Json</RootNamespace>
<AssemblyName>Newtonsoft.Json</AssemblyName>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<SilverlightVersion>
</SilverlightVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug\WindowsPhone\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>
</DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\Release\WindowsPhone\</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>Bin\Release\WindowsPhone\Newtonsoft.Json.xml</DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRuleSet>Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Compile Include="Bson\BsonBinaryType.cs" />
<Compile Include="Bson\BsonBinaryWriter.cs" />
<Compile Include="Bson\BsonObjectId.cs" />
<Compile Include="Bson\BsonReader.cs" />
<Compile Include="Bson\BsonToken.cs" />
<Compile Include="Bson\BsonType.cs" />
<Compile Include="Bson\BsonWriter.cs" />
<Compile Include="ConstructorHandling.cs" />
<Compile Include="Converters\BinaryConverter.cs" />
<Compile Include="Converters\BsonObjectIdConverter.cs" />
<Compile Include="Converters\CustomCreationConverter.cs" />
<Compile Include="Converters\DataSetConverter.cs" />
<Compile Include="Converters\DataTableConverter.cs" />
<Compile Include="Converters\DateTimeConverterBase.cs" />
<Compile Include="Converters\EntityKeyMemberConverter.cs" />
<Compile Include="Converters\ExpandoObjectConverter.cs" />
<Compile Include="Converters\IsoDateTimeConverter.cs" />
<Compile Include="Converters\JavaScriptDateTimeConverter.cs" />
<Compile Include="Converters\KeyValuePairConverter.cs" />
<Compile Include="Converters\RegexConverter.cs" />
<Compile Include="Converters\StringEnumConverter.cs" />
<Compile Include="Converters\VersionConverter.cs" />
<Compile Include="Converters\XmlNodeConverter.cs" />
<Compile Include="DateFormatHandling.cs" />
<Compile Include="DateParseHandling.cs" />
<Compile Include="DateTimeZoneHandling.cs" />
<Compile Include="FloatFormatHandling.cs" />
<Compile Include="FloatParseHandling.cs" />
<Compile Include="FormatterAssemblyStyle.cs" />
<Compile Include="DefaultValueHandling.cs" />
<Compile Include="Formatting.cs" />
<Compile Include="IJsonLineInfo.cs" />
<Compile Include="JsonArrayAttribute.cs" />
<Compile Include="JsonConstructorAttribute.cs" />
<Compile Include="JsonContainerAttribute.cs" />
<Compile Include="JsonConvert.cs" />
<Compile Include="JsonConverter.cs" />
<Compile Include="JsonConverterAttribute.cs" />
<Compile Include="JsonConverterCollection.cs" />
<Compile Include="JsonDictionaryAttribute.cs" />
<Compile Include="JsonException.cs" />
<Compile Include="JsonIgnoreAttribute.cs" />
<Compile Include="JsonObjectAttribute.cs" />
<Compile Include="JsonPosition.cs" />
<Compile Include="JsonPropertyAttribute.cs" />
<Compile Include="JsonReader.cs" />
<Compile Include="JsonReaderException.cs" />
<Compile Include="JsonSerializationException.cs" />
<Compile Include="JsonSerializer.cs" />
<Compile Include="JsonSerializerSettings.cs" />
<Compile Include="JsonTextReader.cs" />
<Compile Include="JsonTextWriter.cs" />
<Compile Include="JsonToken.cs" />
<Compile Include="JsonValidatingReader.cs" />
<Compile Include="JsonWriter.cs" />
<Compile Include="JsonWriterException.cs" />
<Compile Include="Linq\Extensions.cs" />
<Compile Include="Linq\IJEnumerable.cs" />
<Compile Include="Linq\JArray.cs" />
<Compile Include="Linq\JConstructor.cs" />
<Compile Include="Linq\JContainer.cs" />
<Compile Include="Linq\JEnumerable.cs" />
<Compile Include="Linq\JObject.cs" />
<Compile Include="Linq\JPath.cs" />
<Compile Include="Linq\JProperty.cs" />
<Compile Include="Linq\JPropertyDescriptor.cs" />
<Compile Include="Linq\JPropertyKeyedCollection.cs" />
<Compile Include="Linq\JRaw.cs" />
<Compile Include="Linq\JToken.cs" />
<Compile Include="Linq\JTokenEqualityComparer.cs" />
<Compile Include="Linq\JTokenReader.cs" />
<Compile Include="Linq\JTokenType.cs" />
<Compile Include="Linq\JTokenWriter.cs" />
<Compile Include="Linq\JValue.cs" />
<Compile Include="MemberSerialization.cs" />
<Compile Include="MissingMemberHandling.cs" />
<Compile Include="NullValueHandling.cs" />
<Compile Include="ObjectCreationHandling.cs" />
<Compile Include="PreserveReferencesHandling.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ReferenceLoopHandling.cs" />
<Compile Include="Required.cs" />
<Compile Include="SerializationBinder.cs" />
<Compile Include="Serialization\CachedAttributeGetter.cs" />
<Compile Include="Serialization\CamelCasePropertyNamesContractResolver.cs" />
<Compile Include="Serialization\DefaultContractResolver.cs" />
<Compile Include="Serialization\DefaultReferenceResolver.cs" />
<Compile Include="Serialization\DefaultSerializationBinder.cs" />
<Compile Include="Serialization\DiagnosticsTraceWriter.cs" />
<Compile Include="Serialization\DynamicValueProvider.cs" />
<Compile Include="Serialization\ErrorContext.cs" />
<Compile Include="Serialization\ErrorEventArgs.cs" />
<Compile Include="Serialization\IContractResolver.cs" />
<Compile Include="Serialization\IReferenceResolver.cs" />
<Compile Include="Serialization\ITraceWriter.cs" />
<Compile Include="Serialization\IValueProvider.cs" />
<Compile Include="Serialization\JsonArrayContract.cs" />
<Compile Include="Serialization\JsonContainerContract.cs" />
<Compile Include="Serialization\JsonContract.cs" />
<Compile Include="Serialization\JsonDictionaryContract.cs" />
<Compile Include="Serialization\JsonDynamicContract.cs" />
<Compile Include="Serialization\JsonFormatterConverter.cs" />
<Compile Include="Serialization\JsonISerializableContract.cs" />
<Compile Include="Serialization\JsonLinqContract.cs" />
<Compile Include="Serialization\JsonObjectContract.cs" />
<Compile Include="Serialization\JsonPrimitiveContract.cs" />
<Compile Include="Serialization\JsonProperty.cs" />
<Compile Include="Serialization\JsonPropertyCollection.cs" />
<Compile Include="Serialization\JsonSerializerInternalBase.cs" />
<Compile Include="Serialization\JsonSerializerProxy.cs" />
<Compile Include="Serialization\JsonSerializerInternalReader.cs" />
<Compile Include="Serialization\JsonSerializerInternalWriter.cs" />
<Compile Include="Serialization\JsonStringContract.cs" />
<Compile Include="Serialization\LateBoundMetadataTypeAttribute.cs" />
<Compile Include="Serialization\MemoryTraceWriter.cs" />
<Compile Include="Serialization\ObjectConstructor.cs" />
<Compile Include="Serialization\OnErrorAttribute.cs" />
<Compile Include="Serialization\ReflectionValueProvider.cs" />
<Compile Include="StreamingContext.cs" />
<Compile Include="StringEscapeHandling.cs" />
<Compile Include="TraceLevel.cs" />
<Compile Include="TypeNameHandling.cs" />
<Compile Include="Utilities\Base64Encoder.cs" />
<Compile Include="Utilities\BidirectionalDictionary.cs" />
<Compile Include="Utilities\CollectionUtils.cs" />
<Compile Include="Utilities\CollectionWrapper.cs" />
<Compile Include="Utilities\ConvertUtils.cs" />
<Compile Include="Utilities\DateTimeUtils.cs" />
<Compile Include="Utilities\DictionaryWrapper.cs" />
<Compile Include="Utilities\DynamicProxy.cs" />
<Compile Include="Utilities\DynamicProxyMetaObject.cs" />
<Compile Include="Utilities\DynamicReflectionDelegateFactory.cs" />
<Compile Include="Utilities\DynamicUtils.cs" />
<Compile Include="Utilities\DynamicWrapper.cs" />
<Compile Include="Utilities\EnumUtils.cs" />
<Compile Include="Utilities\EnumValue.cs" />
<Compile Include="Utilities\EnumValues.cs" />
<Compile Include="Utilities\ILGeneratorExtensions.cs" />
<Compile Include="Utilities\JavaScriptUtils.cs" />
<Compile Include="Utilities\LateBoundReflectionDelegateFactory.cs" />
<Compile Include="Utilities\MathUtils.cs" />
<Compile Include="Utilities\MethodCall.cs" />
<Compile Include="Utilities\MiscellaneousUtils.cs" />
<Compile Include="Utilities\ReflectionDelegateFactory.cs" />
<Compile Include="Utilities\ReflectionUtils.cs" />
<Compile Include="Utilities\StringBuffer.cs" />
<Compile Include="Utilities\StringReference.cs" />
<Compile Include="Utilities\StringUtils.cs" />
<Compile Include="Utilities\ThreadSafeStore.cs" />
<Compile Include="Utilities\TypeExtensions.cs" />
<Compile Include="Utilities\ValidationUtils.cs" />
<Compile Include="Schema\Extensions.cs" />
<Compile Include="Schema\JsonSchemaException.cs" />
<Compile Include="Schema\JsonSchemaModel.cs" />
<Compile Include="Schema\JsonSchemaModelBuilder.cs" />
<Compile Include="Schema\JsonSchemaNodeCollection.cs" />
<Compile Include="Schema\JsonSchemaNode.cs" />
<Compile Include="Schema\JsonSchemaWriter.cs" />
<Compile Include="Schema\UndefinedSchemaIdHandling.cs" />
<Compile Include="Schema\ValidationEventArgs.cs" />
<Compile Include="Schema\ValidationEventHandler.cs" />
<Compile Include="Schema\JsonSchema.cs" />
<Compile Include="Schema\JsonSchemaBuilder.cs" />
<Compile Include="Schema\JsonSchemaConstants.cs" />
<Compile Include="Schema\JsonSchemaGenerator.cs" />
<Compile Include="Schema\JsonSchemaResolver.cs" />
<Compile Include="Schema\JsonSchemaType.cs" />
<Compile Include="Serialization\JsonTypeReflector.cs" />
<Compile Include="WriteState.cs" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
@@ -32,12 +32,7 @@ using System.Security;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
#if WINDOWS_PHONE
[assembly: AssemblyTitle("Json.NET Windows Phone")]
#elif SILVERLIGHT
[assembly: AssemblyTitle("Json.NET Silverlight")]
#elif PORTABLE40
#if PORTABLE40
[assembly: AssemblyTitle("Json.NET Portable .NET 4.0")]
#elif PORTABLE
[assembly: AssemblyTitle("Json.NET Portable")]
@@ -53,7 +48,6 @@ using System.Security;
[assembly: AssemblyTitle("Json.NET .NET 4.0")]
[assembly: AllowPartiallyTrustedCallers]
#else
[assembly: AssemblyTitle("Json.NET")]
[assembly: AllowPartiallyTrustedCallers]
#endif
@@ -98,4 +92,4 @@ using System.Security;
[assembly: AssemblyVersion("4.5.0.0")]
[assembly: AssemblyFileVersion("5.0.8.16620")]
[assembly: CLSCompliant(true)]
[assembly: CLSCompliant(true)]
@@ -31,7 +31,7 @@ namespace Newtonsoft.Json.Schema
/// <summary>
/// Returns detailed information about the schema exception.
/// </summary>
#if !(SILVERLIGHT || WINDOWS_PHONE || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
[Serializable]
#endif
public class JsonSchemaException : JsonException
@@ -83,7 +83,7 @@ namespace Newtonsoft.Json.Schema
{
}
#if !(WINDOWS_PHONE || SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
/// <summary>
/// Initializes a new instance of the <see cref="JsonSchemaException"/> class.
/// </summary>
@@ -329,14 +329,14 @@ namespace Newtonsoft.Json.Schema
}
}
break;
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
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 || PORTABLE40)
#if !(NET35 || NET20 || PORTABLE40)
case JsonContractType.Dynamic:
#endif
case JsonContractType.Linq:
@@ -388,7 +388,7 @@ namespace Newtonsoft.Json.Schema
CurrentSchema.AllowAdditionalProperties = false;
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
private void GenerateISerializableContract(Type type, JsonISerializableContract contract)
{
CurrentSchema.AllowAdditionalProperties = true;
@@ -445,7 +445,7 @@ namespace Newtonsoft.Json.Schema
case PrimitiveTypeCode.UInt32:
case PrimitiveTypeCode.Int64:
case PrimitiveTypeCode.UInt64:
#if !(PORTABLE || NET35 || NET20 || WINDOWS_PHONE || SILVERLIGHT)
#if !(PORTABLE || NET35 || NET20)
case PrimitiveTypeCode.BigInteger:
#endif
return schemaType | JsonSchemaType.Integer;
@@ -25,7 +25,7 @@
using System;
using System.Collections;
#if !(NET35 || NET20 || SILVERLIGHT || PORTABLE || PORTABLE40)
#if !(NET35 || NET20 || PORTABLE || PORTABLE40)
using System.Collections.Concurrent;
#endif
using System.Collections.Generic;
@@ -97,16 +97,16 @@ namespace Newtonsoft.Json.Serialization
private static readonly IList<JsonConverter> BuiltInConverters = new List<JsonConverter>
{
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
new EntityKeyMemberConverter(),
#endif
#if !(NET35 || NET20 || PORTABLE40)
new ExpandoObjectConverter(),
#endif
#if (!(SILVERLIGHT || PORTABLE40) || WINDOWS_PHONE)
#if (!(PORTABLE40))
new XmlNodeConverter(),
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
new BinaryConverter(),
new DataSetConverter(),
new DataTableConverter(),
@@ -155,7 +155,7 @@ namespace Newtonsoft.Json.Serialization
/// </value>
public bool SerializeCompilerGeneratedMembers { get; set; }
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
/// <summary>
/// Gets or sets a value indicating whether to ignore the <see cref="ISerializable"/> interface when serializing and deserializing types.
/// </summary>
@@ -195,7 +195,7 @@ namespace Newtonsoft.Json.Serialization
#if !NETFX_CORE
DefaultMembersSearchFlags = BindingFlags.Public | BindingFlags.Instance;
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
IgnoreSerializableAttribute = true;
#endif
@@ -260,7 +260,7 @@ namespace Newtonsoft.Json.Serialization
protected virtual List<MemberInfo> GetSerializableMembers(Type objectType)
{
bool ignoreSerializableAttribute;
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
ignoreSerializableAttribute = IgnoreSerializableAttribute;
#else
ignoreSerializableAttribute = true;
@@ -308,7 +308,7 @@ namespace Newtonsoft.Json.Serialization
}
}
#if !SILVERLIGHT && !NET20
#if !NET20
Type match;
// don't include EntityKey on entities objects... this is a bit hacky
if (objectType.AssignableToTypeName("System.Data.Objects.DataClasses.EntityObject", out match))
@@ -329,7 +329,7 @@ namespace Newtonsoft.Json.Serialization
return serializableMembers;
}
#if !SILVERLIGHT && !NET20
#if !NET20
private bool ShouldSerializeEntityMember(MemberInfo memberInfo)
{
PropertyInfo propertyInfo = memberInfo as PropertyInfo;
@@ -354,7 +354,7 @@ namespace Newtonsoft.Json.Serialization
InitializeContract(contract);
bool ignoreSerializableAttribute;
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
ignoreSerializableAttribute = IgnoreSerializableAttribute;
#else
ignoreSerializableAttribute = true;
@@ -377,7 +377,7 @@ namespace Newtonsoft.Json.Serialization
}
else if (contract.MemberSerialization == MemberSerialization.Fields)
{
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
// mimic DataContractSerializer behaviour when populating fields by overriding default creator to create an uninitialized object
// note that this is only possible when the application is fully trusted so fall back to using the default constructor (if available) in partial trust
if (JsonTypeReflector.FullyTrusted)
@@ -732,7 +732,7 @@ namespace Newtonsoft.Json.Serialization
if (onDeserialized != null)
{
// ConcurrentDictionary throws an error here so don't use its OnDeserialized - http://json.codeplex.com/discussions/257093
#if !(NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE || PORTABLE40)
#if !(NET35 || NET20 || PORTABLE || PORTABLE40)
if (!t.IsGenericType() || (t.GetGenericTypeDefinition() != typeof(ConcurrentDictionary<,>)))
contract.OnDeserializedCallbacks.AddRange(onDeserialized);
#else
@@ -875,7 +875,7 @@ namespace Newtonsoft.Json.Serialization
return contract;
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
/// <summary>
/// Creates a <see cref="JsonISerializableContract"/> for the given type.
/// </summary>
@@ -962,7 +962,7 @@ namespace Newtonsoft.Json.Serialization
if (CanConvertToString(t))
return CreateStringContract(objectType);
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
if (!IgnoreSerializableInterface && typeof(ISerializable).IsAssignableFrom(t))
return CreateISerializableContract(objectType);
#endif
@@ -1008,10 +1008,8 @@ namespace Newtonsoft.Json.Serialization
// use the objectType's TypeConverter if it has one and can convert to a string
if (converter != null
#if !SILVERLIGHT
&& !(converter is ComponentConverter)
&& !(converter is ReferenceConverter)
#endif
&& converter.GetType() != typeof(TypeConverter))
{
if (converter.CanConvertTo(typeof(string)))
@@ -1022,11 +1020,6 @@ namespace Newtonsoft.Json.Serialization
if (type == typeof(Type) || type.IsSubclassOf(typeof(Type)))
return true;
#if SILVERLIGHT
if (type == typeof(Guid) || type == typeof(Uri) || type == typeof(TimeSpan))
return true;
#endif
return false;
}
@@ -1107,7 +1100,7 @@ namespace Newtonsoft.Json.Serialization
// warning - this method use to cause errors with Intellitrace. Retest in VS Ultimate after changes
IValueProvider valueProvider;
#if !(SILVERLIGHT || PORTABLE40 || PORTABLE || NETFX_CORE)
#if !(PORTABLE40 || PORTABLE || NETFX_CORE)
if (DynamicCodeGeneration)
valueProvider = new DynamicValueProvider(member);
else
@@ -1208,7 +1201,7 @@ namespace Newtonsoft.Json.Serialization
JsonTypeReflector.GetAttribute<JsonIgnoreAttribute>(attributeProvider) != null
// automatically ignore extension data dictionary property if it is public
|| JsonTypeReflector.GetAttribute<JsonExtensionDataAttribute>(attributeProvider) != null
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
|| JsonTypeReflector.GetAttribute<NonSerializedAttribute>(attributeProvider) != null
#endif
;
@@ -49,7 +49,7 @@ namespace Newtonsoft.Json.Serialization
{
Assembly assembly;
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
// look, I don't like using obsolete methods as much as you do but this is the only way
// Assembly.Load won't check the GAC for a partial name
#pragma warning disable 618,612
@@ -145,14 +145,11 @@ namespace Newtonsoft.Json.Serialization
public override void BindToName(Type serializedType, out string assemblyName, out string typeName)
{
#if NETFX_CORE || PORTABLE
assemblyName = serializedType.GetTypeInfo().Assembly.FullName;
typeName = serializedType.FullName;
#elif !SILVERLIGHT
assemblyName = serializedType.Assembly.FullName;
assemblyName = serializedType.GetTypeInfo().Assembly.FullName;
typeName = serializedType.FullName;
#else
assemblyName = null;
typeName = serializedType.AssemblyQualifiedName;
assemblyName = serializedType.Assembly.FullName;
typeName = serializedType.FullName;
#endif
}
#endif
@@ -1,4 +1,4 @@
#if !(SILVERLIGHT || PORTABLE40 || PORTABLE || NETFX_CORE)
#if !(PORTABLE40 || PORTABLE || NETFX_CORE)
using System;
using System.Diagnostics;
using DiagnosticsTrace = System.Diagnostics.Trace;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || PORTABLE40 || PORTABLE || NETFX_CORE)
#if !(PORTABLE40 || PORTABLE || NETFX_CORE)
using System;
using System.Collections.Generic;
#if NET20
@@ -124,7 +124,7 @@ namespace Newtonsoft.Json.Serialization
canDeserialize = true;
ShouldCreateWrapper = true;
}
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (ReflectionUtils.ImplementsGenericDefinition(underlyingType, typeof(IReadOnlyCollection<>), out tempCollectionType))
{
CollectionItemType = underlyingType.GetGenericArguments()[0];
@@ -44,7 +44,7 @@ namespace Newtonsoft.Json.Serialization
#if !(NET35 || NET20 || PORTABLE40)
Dynamic,
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
Serializable,
#endif
Linq
@@ -92,11 +92,11 @@ namespace Newtonsoft.Json.Serialization
if (ReflectionUtils.IsGenericDefinition(UnderlyingType, typeof(IDictionary<,>)))
CreatedType = typeof(Dictionary<,>).MakeGenericType(keyType, valueType);
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
IsReadOnlyOrFixedSize = ReflectionUtils.InheritsGenericDefinition(underlyingType, typeof(ReadOnlyDictionary<,>));
#endif
}
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (ReflectionUtils.ImplementsGenericDefinition(underlyingType, typeof(IReadOnlyDictionary<,>), out _genericCollectionDefinitionType))
{
keyType = _genericCollectionDefinitionType.GetGenericArguments()[0];
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
using System;
using System.Globalization;
using System.Runtime.Serialization;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
using System;
namespace Newtonsoft.Json.Serialization
@@ -130,7 +130,7 @@ namespace Newtonsoft.Json.Serialization
ConstructorParameters = new JsonPropertyCollection(UnderlyingType);
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35)
[SecuritySafeCritical]
#endif
@@ -33,7 +33,7 @@ using System.Dynamic;
#endif
using System.Diagnostics;
using System.Globalization;
#if !(PORTABLE || PORTABLE40 || NET35 || NET20 || SILVERLIGHT)
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
using System.Numerics;
#endif
using System.Reflection;
@@ -59,7 +59,7 @@ namespace Newtonsoft.Json.Serialization
}
private JsonSerializerProxy _internalSerializer;
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
private JsonFormatterConverter _formatterConverter;
#endif
@@ -188,7 +188,7 @@ namespace Newtonsoft.Json.Serialization
return _internalSerializer;
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
private JsonFormatterConverter GetFormatterConverter()
{
if (_formatterConverter == null)
@@ -304,7 +304,7 @@ namespace Newtonsoft.Json.Serialization
{
case JsonContractType.Object:
case JsonContractType.Dictionary:
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
case JsonContractType.Serializable:
#endif
#if !(NET35 || NET20 || PORTABLE40)
@@ -458,7 +458,7 @@ namespace Newtonsoft.Json.Serialization
JsonDynamicContract dynamicContract = (JsonDynamicContract)contract;
return CreateDynamic(reader, dynamicContract, member, id);
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
case JsonContractType.Serializable:
JsonISerializableContract serializableContract = (JsonISerializableContract)contract;
return CreateISerializable(reader, serializableContract, member, id);
@@ -720,7 +720,7 @@ To fix this error either change the JSON to a {1} or change the deserialized typ
return Enum.ToObject(contract.NonNullableUnderlyingType, value);
}
#if !(PORTABLE || PORTABLE40 || NET35 || NET20 || SILVERLIGHT)
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
if (value is BigInteger)
return ConvertUtils.FromBigInteger((BigInteger)value, targetType);
#endif
@@ -1286,7 +1286,7 @@ To fix this error either change the JSON to a {1} or change the deserialized typ
return underlyingList;
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
private object CreateISerializable(JsonReader reader, JsonISerializableContract contract, JsonProperty member, string id)
{
Type objectType = contract.UnderlyingType;
@@ -154,7 +154,7 @@ namespace Newtonsoft.Json.Serialization
SerializeDynamic(writer, (IDynamicMetaObjectProvider)value, (JsonDynamicContract)valueContract, member, containerContract, containerProperty);
break;
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
case JsonContractType.Serializable:
SerializeISerializable(writer, (ISerializable)value, (JsonISerializableContract)valueContract, member, containerContract, containerProperty);
break;
@@ -298,25 +298,18 @@ namespace Newtonsoft.Json.Serialization
// use the objectType's TypeConverter if it has one and can convert to a string
if (converter != null
#if !SILVERLIGHT
&& !(converter is ComponentConverter)
#endif
&& converter.GetType() != typeof(TypeConverter))
{
if (converter.CanConvertTo(typeof(string)))
{
#if !SILVERLIGHT
s = converter.ConvertToInvariantString(value);
#else
s = converter.ConvertToString(value);
#endif
return true;
}
}
#endif
#if SILVERLIGHT || NETFX_CORE || PORTABLE
#if NETFX_CORE || PORTABLE
if (value is Guid || value is Uri || value is TimeSpan)
{
s = value.ToString();
@@ -704,7 +697,7 @@ namespace Newtonsoft.Json.Serialization
return writeMetadataObject;
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35)
[SecuritySafeCritical]
#endif
@@ -41,7 +41,7 @@ using System.Runtime.Serialization;
namespace Newtonsoft.Json.Serialization
{
#if !SILVERLIGHT && !NET20 && !NETFX_CORE
#if !NET20 && !NETFX_CORE
internal interface IMetadataTypeAttribute
{
Type MetadataClassType { get; }
@@ -63,7 +63,7 @@ namespace Newtonsoft.Json.Serialization
public const string SpecifiedPostfix = "Specified";
private static readonly ThreadSafeStore<object, Type> JsonConverterTypeCache = new ThreadSafeStore<object, Type>(GetJsonConverterTypeFromAttribute);
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
private static readonly ThreadSafeStore<Type, Type> AssociatedMetadataTypesCache = new ThreadSafeStore<Type, Type>(GetAssociateMetadataTypeFromAttribute);
private const string MetadataTypeAttributeTypeName =
@@ -71,23 +71,6 @@ namespace Newtonsoft.Json.Serialization
private static Type _cachedMetadataTypeAttributeType;
#endif
#if SILVERLIGHT
private static readonly ThreadSafeStore<object, Type> TypeConverterTypeCache = new ThreadSafeStore<object, Type>(GetTypeConverterTypeFromAttribute);
private static Type GetTypeConverterTypeFromAttribute(object attributeProvider)
{
TypeConverterAttribute converterAttribute = GetAttribute<TypeConverterAttribute>(attributeProvider);
if (converterAttribute == null)
return null;
return Type.GetType(converterAttribute.ConverterTypeName);
}
private static Type GetTypeConverterType(object attributeProvider)
{
return TypeConverterTypeCache.Get(attributeProvider);
}
#endif
public static JsonContainerAttribute GetJsonContainerAttribute(Type type)
{
@@ -109,7 +92,7 @@ namespace Newtonsoft.Json.Serialization
return GetJsonContainerAttribute(type) as JsonDictionaryAttribute;
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE || PORTABLE40)
#if !(NETFX_CORE || PORTABLE || PORTABLE40)
public static SerializableAttribute GetSerializableAttribute(Type type)
{
return CachedAttributeGetter<SerializableAttribute>.GetAttribute(type);
@@ -178,7 +161,7 @@ namespace Newtonsoft.Json.Serialization
return MemberSerialization.OptIn;
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
if (!ignoreSerializableAttribute)
{
SerializableAttribute serializableAttribute = GetSerializableAttribute(objectType);
@@ -221,20 +204,11 @@ namespace Newtonsoft.Json.Serialization
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
public static TypeConverter GetTypeConverter(Type type)
{
#if !SILVERLIGHT
return TypeDescriptor.GetConverter(type);
#else
Type converterType = GetTypeConverterType(type);
if (converterType != null)
return (TypeConverter)Activator.CreateInstance(converterType);
return null;
#endif
}
#endif
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
private static Type GetAssociatedMetadataType(Type type)
{
return AssociatedMetadataTypesCache.Get(type);
@@ -279,7 +253,7 @@ namespace Newtonsoft.Json.Serialization
{
T attribute;
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
Type metadataType = GetAssociatedMetadataType(type);
if (metadataType != null)
{
@@ -307,7 +281,7 @@ namespace Newtonsoft.Json.Serialization
{
T attribute;
#if !(SILVERLIGHT || NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NET20 || NETFX_CORE || PORTABLE40 || PORTABLE)
Type metadataType = GetAssociatedMetadataType(memberInfo.DeclaringType);
if (metadataType != null)
{
@@ -371,14 +345,14 @@ namespace Newtonsoft.Json.Serialization
public static bool DynamicCodeGeneration
{
#if !(NET20 || NET35 || SILVERLIGHT || NETFX_CORE || PORTABLE)
#if !(NET20 || NET35 || NETFX_CORE || PORTABLE)
[SecuritySafeCritical]
#endif
get
{
if (_dynamicCodeGeneration == null)
{
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
try
{
new ReflectionPermission(ReflectionPermissionFlag.MemberAccess).Demand();
@@ -407,7 +381,7 @@ namespace Newtonsoft.Json.Serialization
{
if (_fullyTrusted == null)
{
#if (NETFX_CORE || SILVERLIGHT || PORTABLE || PORTABLE40)
#if (NETFX_CORE || PORTABLE || PORTABLE40)
_fullyTrusted = false;
#elif !(NET20 || NET35 || PORTABLE40)
AppDomain appDomain = AppDomain.CurrentDomain;
@@ -434,7 +408,7 @@ namespace Newtonsoft.Json.Serialization
{
get
{
#if !(SILVERLIGHT || PORTABLE40 || PORTABLE || NETFX_CORE)
#if !(PORTABLE40 || PORTABLE || NETFX_CORE)
if (DynamicCodeGeneration)
return DynamicReflectionDelegateFactory.Instance;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !SILVERLIGHT && !NET20 && !NETFX_CORE
#if !NET20 && !NETFX_CORE
using System;
using System.Collections.Generic;
using System.Linq;
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.IO;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
using System.Numerics;
#endif
using System.Text;
@@ -143,7 +143,7 @@ namespace Newtonsoft.Json.Serialization
public override void WriteValue(object value)
{
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
if (value is BigInteger)
{
_textWriter.WriteValue(value);
+1 -1
View File
@@ -1,5 +1,5 @@

#if SILVERLIGHT || PocketPC || NETFX_CORE || PORTABLE40 || PORTABLE
#if PocketPC || NETFX_CORE || PORTABLE40 || PORTABLE
using System;
using System.Reflection;
+1 -1
View File
@@ -1,5 +1,5 @@

#if (NETFX_CORE || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if (NETFX_CORE || PORTABLE40 || PORTABLE)
using Newtonsoft.Json.Serialization;
namespace Newtonsoft.Json
@@ -76,7 +76,7 @@ namespace Newtonsoft.Json.Utilities
}
}
#if (NET20 || NET35 || SILVERLIGHT || PORTABLE40)
#if (NET20 || NET35 || PORTABLE40)
public static void AddRange<T>(this IList<T> initial, IEnumerable collection)
{
ValidationUtils.ArgumentNotNull(initial, "initial");
@@ -94,7 +94,7 @@ namespace Newtonsoft.Json.Utilities
return true;
if (ReflectionUtils.ImplementsGenericDefinition(type, typeof(IDictionary<,>)))
return true;
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
if (ReflectionUtils.ImplementsGenericDefinition(type, typeof(IReadOnlyDictionary<,>)))
return true;
#endif
+8 -20
View File
@@ -27,7 +27,7 @@ using System;
using System.Collections.Generic;
using System.Globalization;
using System.ComponentModel;
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
using System.Numerics;
#endif
using Newtonsoft.Json.Serialization;
@@ -35,7 +35,7 @@ using System.Reflection;
#if NET20
using Newtonsoft.Json.Utilities.LinqBridge;
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
using System.Data.SqlTypes;
#endif
@@ -82,7 +82,7 @@ namespace Newtonsoft.Json.Utilities
GuidNullable,
TimeSpan,
TimeSpanNullable,
#if !(PORTABLE || NET35 || NET20 || WINDOWS_PHONE || SILVERLIGHT)
#if !(PORTABLE || NET35 || NET20)
BigInteger,
BigIntegerNullable,
#endif
@@ -147,7 +147,7 @@ namespace Newtonsoft.Json.Utilities
{ typeof(Guid?), PrimitiveTypeCode.GuidNullable },
{ typeof(TimeSpan), PrimitiveTypeCode.TimeSpan },
{ typeof(TimeSpan?), PrimitiveTypeCode.TimeSpanNullable },
#if !(PORTABLE || PORTABLE40 || NET35 || NET20 || WINDOWS_PHONE || SILVERLIGHT)
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
{ typeof(BigInteger), PrimitiveTypeCode.BigInteger },
{ typeof(BigInteger?), PrimitiveTypeCode.BigIntegerNullable },
#endif
@@ -295,7 +295,7 @@ namespace Newtonsoft.Json.Utilities
return o => call(null, o);
}
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE || PORTABLE40)
#if !(NET20 || NET35 || PORTABLE || PORTABLE40)
internal static BigInteger ToBigInteger(object value)
{
if (value is BigInteger)
@@ -399,7 +399,7 @@ namespace Newtonsoft.Json.Utilities
return Type.GetType((string)initialValue, true);
}
#if !(NET20 || NET35 || SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(NET20 || NET35 || PORTABLE40 || PORTABLE)
if (targetType == typeof(BigInteger))
return ToBigInteger(initialValue);
if (initialValue is BigInteger)
@@ -411,24 +411,12 @@ namespace Newtonsoft.Json.Utilities
TypeConverter toConverter = GetConverter(initialType);
if (toConverter != null && toConverter.CanConvertTo(targetType))
{
#if !SILVERLIGHT
return toConverter.ConvertTo(null, culture, initialValue, targetType);
#else
return toConverter.ConvertTo(initialValue, targetType);
#endif
}
TypeConverter fromConverter = GetConverter(targetType);
if (fromConverter != null && fromConverter.CanConvertFrom(initialType))
{
#if !SILVERLIGHT
return fromConverter.ConvertFrom(null, culture, initialValue);
#else
return fromConverter.ConvertFrom(initialValue);
#endif
}
#endif
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
// handle DBNull and INullable
@@ -440,7 +428,7 @@ namespace Newtonsoft.Json.Utilities
throw new Exception("Can not convert null {0} into non-nullable {1}.".FormatWith(CultureInfo.InvariantCulture, initialType, targetType));
}
#endif
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
if (initialValue is INullable)
return EnsureTypeAssignable(ToValue((INullable)initialValue), initialType, targetType);
#endif
@@ -529,7 +517,7 @@ namespace Newtonsoft.Json.Utilities
throw new ArgumentException("Could not cast or convert from {0} to {1}.".FormatWith(CultureInfo.InvariantCulture, (initialType != null) ? initialType.ToString() : "{null}", targetType));
}
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
public static object ToValue(INullable nullableValue)
{
if (nullableValue == null)
@@ -46,7 +46,7 @@ namespace Newtonsoft.Json.Utilities
{
private readonly IDictionary _dictionary;
private readonly IDictionary<TKey, TValue> _genericDictionary;
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
private readonly IReadOnlyDictionary<TKey, TValue> _readOnlyDictionary;
#endif
private object _syncRoot;
@@ -65,7 +65,7 @@ namespace Newtonsoft.Json.Utilities
_genericDictionary = dictionary;
}
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
public DictionaryWrapper(IReadOnlyDictionary<TKey, TValue> dictionary)
{
ValidationUtils.ArgumentNotNull(dictionary, "dictionary");
@@ -88,7 +88,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return _dictionary.Contains(key);
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary.ContainsKey(key);
#endif
@@ -102,7 +102,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return _dictionary.Keys.Cast<TKey>().ToList();
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary.Keys.ToList();
#endif
@@ -125,7 +125,7 @@ namespace Newtonsoft.Json.Utilities
return false;
}
}
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
{
throw new NotSupportedException();
@@ -152,7 +152,7 @@ namespace Newtonsoft.Json.Utilities
return true;
}
}
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
{
throw new NotSupportedException();
@@ -170,7 +170,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return _dictionary.Values.Cast<TValue>().ToList();
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary.Values.ToList();
#endif
@@ -185,7 +185,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return (TValue)_dictionary[key];
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary[key];
#endif
@@ -196,7 +196,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
_dictionary[key] = value;
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
throw new NotSupportedException();
#endif
@@ -209,7 +209,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
((IList)_dictionary).Add(item);
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
throw new NotSupportedException();
#endif
@@ -221,7 +221,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
_dictionary.Clear();
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
throw new NotSupportedException();
#endif
@@ -233,7 +233,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return ((IList)_dictionary).Contains(item);
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary.Contains(item);
#endif
@@ -250,7 +250,7 @@ namespace Newtonsoft.Json.Utilities
array[arrayIndex++] = new KeyValuePair<TKey, TValue>((TKey)item.Key, (TValue)item.Value);
}
}
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
{
throw new NotSupportedException();
@@ -268,7 +268,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return _dictionary.Count;
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary.Count;
#endif
@@ -283,7 +283,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return _dictionary.IsReadOnly;
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return true;
#endif
@@ -315,7 +315,7 @@ namespace Newtonsoft.Json.Utilities
return true;
}
}
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
{
throw new NotSupportedException();
@@ -331,7 +331,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return _dictionary.Cast<DictionaryEntry>().Select(de => new KeyValuePair<TKey, TValue>((TKey)de.Key, (TValue)de.Value)).GetEnumerator();
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary.GetEnumerator();
#endif
@@ -348,7 +348,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
_dictionary.Add(key, value);
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
throw new NotSupportedException();
#endif
@@ -362,7 +362,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return _dictionary[key];
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary[(TKey)key];
#endif
@@ -373,7 +373,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
_dictionary[key] = value;
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
throw new NotSupportedException();
#endif
@@ -427,7 +427,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return _dictionary.GetEnumerator();
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return new DictionaryEnumerator<TKey, TValue>(_readOnlyDictionary.GetEnumerator());
#endif
@@ -439,7 +439,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_genericDictionary != null)
return _genericDictionary.ContainsKey((TKey)key);
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary.ContainsKey((TKey)key);
#endif
@@ -453,7 +453,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_genericDictionary != null)
return false;
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return true;
#endif
@@ -468,7 +468,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_genericDictionary != null)
return _genericDictionary.Keys.ToList();
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary.Keys.ToList();
#endif
@@ -481,7 +481,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
_dictionary.Remove(key);
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
throw new NotSupportedException();
#endif
@@ -495,7 +495,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_genericDictionary != null)
return _genericDictionary.Values.ToList();
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary.Values.ToList();
#endif
@@ -508,7 +508,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
_dictionary.CopyTo(array, index);
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
throw new NotSupportedException();
#endif
@@ -544,7 +544,7 @@ namespace Newtonsoft.Json.Utilities
{
if (_dictionary != null)
return _dictionary;
#if !(NET40 || NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE || PORTABLE40)
#if !(NET40 || NET35 || NET20 || PORTABLE40)
else if (_readOnlyDictionary != null)
return _readOnlyDictionary;
#endif
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || PORTABLE || NETFX_CORE || PORTABLE40)
#if !(PORTABLE || NETFX_CORE || PORTABLE40)
using System;
using System.Collections.Generic;
#if NET20
@@ -29,7 +29,7 @@ using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Linq.Expressions;
#if !(PORTABLE || WINDOWS_PHONE)
#if !(PORTABLE)
using System.Reflection;
#else
using Microsoft.CSharp.RuntimeBinder;
@@ -45,12 +45,8 @@ namespace Newtonsoft.Json.Utilities
{
internal static class BinderWrapper
{
#if !(PORTABLE || WINDOWS_PHONE)
#if !SILVERLIGHT
#if !(PORTABLE)
public const string CSharpAssemblyName = "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
#else
public const string CSharpAssemblyName = "Microsoft.CSharp, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
#endif
private const string BinderTypeName = "Microsoft.CSharp.RuntimeBinder.Binder, " + CSharpAssemblyName;
private const string CSharpArgumentInfoTypeName = "Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo, " + CSharpAssemblyName;
@@ -116,7 +112,7 @@ namespace Newtonsoft.Json.Utilities
public static CallSiteBinder GetMember(string name, Type context)
{
#if !(PORTABLE || WINDOWS_PHONE)
#if !(PORTABLE)
Init();
return (CallSiteBinder)_getMemberCall(null, 0, name, context, _getCSharpArgumentInfoArray);
#else
@@ -127,7 +123,7 @@ namespace Newtonsoft.Json.Utilities
public static CallSiteBinder SetMember(string name, Type context)
{
#if !(PORTABLE || WINDOWS_PHONE)
#if !(PORTABLE)
Init();
return (CallSiteBinder)_setMemberCall(null, 0, name, context, _setCSharpArgumentInfoArray);
#else
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || NETFX_CORE || PORTABLE40 || PORTABLE)
#if !(NETFX_CORE || PORTABLE40 || PORTABLE)
using System;
using System.Collections.Generic;
using System.IO;
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(SILVERLIGHT || PORTABLE40 || PORTABLE || NETFX_CORE)
#if !(PORTABLE40 || PORTABLE || NETFX_CORE)
using System;
using System.Reflection.Emit;
using System.Reflection;
@@ -25,7 +25,7 @@
using System;
using System.Collections.Generic;
#if !(PORTABLE || PORTABLE40 || NET35 || NET20 || WINDOWS_PHONE || SILVERLIGHT)
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
using System.Numerics;
#endif
using System.Reflection;
@@ -928,7 +928,7 @@ namespace Newtonsoft.Json.Utilities
return 0m;
case PrimitiveTypeCode.DateTime:
return new DateTime();
#if !(PORTABLE || PORTABLE40 || NET35 || NET20 || WINDOWS_PHONE || SILVERLIGHT)
#if !(PORTABLE || PORTABLE40 || NET35 || NET20)
case PrimitiveTypeCode.BigInteger:
return new BigInteger();
#endif
+2 -2
View File
@@ -182,7 +182,7 @@ namespace Newtonsoft.Json.Utilities
public static bool IsHighSurrogate(char c)
{
#if !(SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(PORTABLE40 || PORTABLE)
return char.IsHighSurrogate(c);
#else
return (c >= 55296 && c <= 56319);
@@ -191,7 +191,7 @@ namespace Newtonsoft.Json.Utilities
public static bool IsLowSurrogate(char c)
{
#if !(SILVERLIGHT || PORTABLE40 || PORTABLE)
#if !(PORTABLE40 || PORTABLE)
return char.IsLowSurrogate(c);
#else
return (c >= 56320 && c <= 57343);