-Implemented INotifyCollectionChanged on JContainer in Silverlight

-Added StreamingContext to JsonSerializer
-Added CreateMemberValueProvider method to DefaultContractResolver
-Fixed not falling back the original class from the metadata class when attribute not found
This commit is contained in:
JamesNK
2010-01-19 08:22:35 +00:00
parent f9b34390f5
commit 621916f5a6
15 changed files with 233 additions and 41 deletions
@@ -7,6 +7,8 @@ using Newtonsoft.Json.Tests.LinqToSql;
using NUnit.Framework;
using System.Reflection;
using System.ComponentModel;
using Newtonsoft.Json.Serialization;
using System.Data.Linq.Mapping;
namespace Newtonsoft.Json.Tests.LinqToSql
{
@@ -97,6 +99,12 @@ namespace Newtonsoft.Json.Tests.LinqToSql
Assert.AreEqual(1, person.PersonRoles[0].Role.PersonRoles.Count);
Assert.AreEqual("Name!", person.Department.Name);
TableAttribute tableAttribute = JsonTypeReflector.GetAttribute<TableAttribute>(typeof(Person));
Assert.AreEqual("", tableAttribute.Name);
ColumnAttribute columnAttribute = JsonTypeReflector.GetAttribute<ColumnAttribute>(typeof(Person).GetProperty("FirstName"));
Assert.AreEqual("_FirstName", columnAttribute.Storage);
}
}
}
}