-Updated source code to VS2010

-Updated main project to .NET 4.0
-Updated to psake 4.0
-Changed assembly version to 4.0.0.0
-Added ICustomTypeDescriptor implementation to JObject, removed JTypeDescriptionProvider and JTypeDescriptor
-Changed serialization of collections to use iterator rather than indexer
-Removed Compact Framework project
-Fixed XML documentation warnings
This commit is contained in:
JamesNK
2010-08-31 02:19:41 +00:00
parent 97d9cf82ef
commit 12a91cce9e
37 changed files with 1686 additions and 1932 deletions
@@ -33,7 +33,7 @@ using Newtonsoft.Json.Tests.TestObjects;
namespace Newtonsoft.Json.Tests.TestObjects
{
public class VersionKeyedCollection : KeyedCollection<string, Person>, IList
public class VersionKeyedCollection : KeyedCollection<string, Person>, IEnumerable<Person>
{
public List<string> Messages { get; set; }
@@ -54,16 +54,20 @@ namespace Newtonsoft.Json.Tests.TestObjects
errorContext.Handled = true;
}
object IList.this[int index]
IEnumerator<Person> IEnumerable<Person>.GetEnumerator()
{
get
for (int i = 0; i < Count; i++)
{
if (index % 2 == 0)
throw new Exception("Index even: " + index);
if (i % 2 == 0)
throw new Exception("Index even: " + i);
return this[index];
yield return this[i];
}
set { this[index] = (Person)value; }
}
IEnumerator IEnumerable.GetEnumerator()
{
return ((IEnumerable<Person>) this).GetEnumerator();
}
}
}