Skip to content

Commit

Permalink
-Clean up compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Oct 1, 2011
1 parent 4f947d9 commit ea2897c
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Src/Newtonsoft.Json/JsonWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,16 +353,16 @@ internal void WriteToken(JsonReader reader, int initialDepth)
WriteComment(reader.Value.ToString());
break;
case JsonToken.Integer:
WriteValue(Convert.ToInt64(reader.Value));
WriteValue(Convert.ToInt64(reader.Value, CultureInfo.InvariantCulture));
break;
case JsonToken.Float:
WriteValue(Convert.ToDouble(reader.Value));
WriteValue(Convert.ToDouble(reader.Value, CultureInfo.InvariantCulture));
break;
case JsonToken.String:
WriteValue(reader.Value.ToString());
break;
case JsonToken.Boolean:
WriteValue(Convert.ToBoolean(reader.Value));
WriteValue(Convert.ToBoolean(reader.Value, CultureInfo.InvariantCulture));
break;
case JsonToken.Null:
WriteNull();
Expand Down
4 changes: 4 additions & 0 deletions Src/Newtonsoft.Json/Linq/JArray.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public class JArray : JContainer, IList<JToken>
{
private IList<JToken> _values = new List<JToken>();

/// <summary>
/// Gets the container's children tokens.
/// </summary>
/// <value>The container's children tokens.</value>
protected override IList<JToken> ChildrenTokens
{
get { return _values; }
Expand Down
4 changes: 4 additions & 0 deletions Src/Newtonsoft.Json/Linq/JConstructor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public class JConstructor : JContainer
private string _name;
private IList<JToken> _values = new List<JToken>();

/// <summary>
/// Gets the container's children tokens.
/// </summary>
/// <value>The container's children tokens.</value>
protected override IList<JToken> ChildrenTokens
{
get { return _values; }
Expand Down
8 changes: 8 additions & 0 deletions Src/Newtonsoft.Json/Linq/JContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ public abstract class JContainer : JToken, IList<JToken>
public event NotifyCollectionChangedEventHandler CollectionChanged;
#endif

/// <summary>
/// Gets the container's children tokens.
/// </summary>
/// <value>The container's children tokens.</value>
protected abstract IList<JToken> ChildrenTokens { get; }

private object _syncRoot;
Expand Down Expand Up @@ -865,6 +869,10 @@ void ICollection.CopyTo(Array array, int index)
CopyItemsTo(array, index);
}

/// <summary>
/// Gets the count of child JSON tokens.
/// </summary>
/// <value>The count of child JSON tokens</value>
public int Count
{
get { return ChildrenTokens.Count; }
Expand Down
4 changes: 4 additions & 0 deletions Src/Newtonsoft.Json/Linq/JObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ protected override void InsertItem(int index, JToken item)

private JPropertKeyedCollection _properties = new JPropertKeyedCollection(StringComparer.Ordinal);

/// <summary>
/// Gets the container's children tokens.
/// </summary>
/// <value>The container's children tokens.</value>
protected override IList<JToken> ChildrenTokens
{
get { return _properties; }
Expand Down
4 changes: 4 additions & 0 deletions Src/Newtonsoft.Json/Linq/JProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public class JProperty : JContainer
private readonly List<JToken> _content = new List<JToken>();
private readonly string _name;

/// <summary>
/// Gets the container's children tokens.
/// </summary>
/// <value>The container's children tokens.</value>
protected override IList<JToken> ChildrenTokens
{
get { return _content; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ public override Type BindToType(string assemblyName, string typeName)
}

#if !(NET35 || NET20)
/// <summary>
/// When overridden in a derived class, controls the binding of a serialized object to a type.
/// </summary>
/// <param name="serializedType">The type of the object the formatter creates a new instance of.</param>
/// <param name="assemblyName">Specifies the <see cref="T:System.Reflection.Assembly"/> name of the serialized object. </param>
/// <param name="typeName">Specifies the <see cref="T:System.Type"/> name of the serialized object. </param>
public override void BindToName(Type serializedType, out string assemblyName, out string typeName)
{
#if !SILVERLIGHT
Expand Down

0 comments on commit ea2897c

Please sign in to comment.