-Added missing XML documentation

-Fixed potential null reference error when getting attributes
-Performance documentation
This commit is contained in:
James Newton-King
2012-10-27 19:25:04 +13:00
parent 0e4611ed86
commit 1fa5e4a22e
14 changed files with 459 additions and 13 deletions
@@ -1881,6 +1881,24 @@ Parameter name: arrayIndex",
Assert.IsTrue(JToken.DeepEquals(b, a));
}
[Test]
public void GetValueBlogExample()
{
JObject o = JObject.Parse(@"{
'name': 'Lower',
'NAME': 'Upper'
}");
string exactMatch = (string)o.GetValue("NAME", StringComparison.OrdinalIgnoreCase);
// Upper
string ignoreCase = (string)o.GetValue("Name", StringComparison.OrdinalIgnoreCase);
// Lower
Assert.AreEqual("Upper", exactMatch);
Assert.AreEqual("Lower", ignoreCase);
}
[Test]
public void GetValue()
{