-Added more IBindingList functionality

-Fixed many bugs around JProperty and JObject
-Changed JProperty constructor that doesn't take a value to internal
-Added many unit tests
-Renamed CloneNode to CloseToken
-Changed JPropertyDescriptor to always return the token rather than value
This commit is contained in:
JamesNK
2009-09-04 13:46:47 +00:00
parent 95caaf9dc1
commit 379c3ce09b
15 changed files with 1571 additions and 250 deletions
+9 -2
View File
@@ -58,6 +58,13 @@ namespace Newtonsoft.Json.Linq
get { return JTokenType.Constructor; }
}
/// <summary>
/// Initializes a new instance of the <see cref="JConstructor"/> class.
/// </summary>
public JConstructor()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="JConstructor"/> class from another <see cref="JConstructor"/> object.
/// </summary>
@@ -106,7 +113,7 @@ namespace Newtonsoft.Json.Linq
return (c != null && _name == c.Name && ContentsEqual(c));
}
internal override JToken CloneNode()
internal override JToken CloneToken()
{
return new JConstructor(this);
}
@@ -152,7 +159,7 @@ namespace Newtonsoft.Json.Linq
if (!(key is int))
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);
return GetItem((int)key);
}
}