Change - Heaps of small changes and bug fixes around LINQ to JSON. Many unit tests added.

Change - CultureInfo is now always passed into FormatWith
This commit is contained in:
JamesNK
2008-04-04 22:45:52 +00:00
parent e469918596
commit ffe2d91279
34 changed files with 1104 additions and 262 deletions
+4 -2
View File
@@ -28,6 +28,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json.Utilities;
using System.Globalization;
namespace Newtonsoft.Json.Linq
{
@@ -53,6 +54,7 @@ namespace Newtonsoft.Json.Linq
public JConstructor(JConstructor other)
: base(other)
{
_name = other.Name;
}
public JConstructor(string name, params object[] content)
@@ -89,7 +91,7 @@ namespace Newtonsoft.Json.Linq
switch (o.Type)
{
case JsonTokenType.Property:
throw new ArgumentException("An item of type {0} cannot be added to content.".FormatWith(o.Type));
throw new ArgumentException("An item of type {0} cannot be added to content.".FormatWith(CultureInfo.InvariantCulture, o.Type));
}
}
@@ -112,7 +114,7 @@ namespace Newtonsoft.Json.Linq
ValidationUtils.ArgumentNotNull(key, "o");
if (!(key is int))
throw new ArgumentException("Accessed JConstructor values with invalid key value: {0}. Argument position index expected.".FormatWith(MiscellaneousUtils.ToString(key)));
throw new ArgumentException("Accessed JConstructor values with invalid key value: {0}. Argument position index expected.".FormatWith(CultureInfo.InvariantCulture, MiscellaneousUtils.ToString(key)));
return GetIndex(this, (int)key);
}