-Added JsonConstructorAttribute support for lists and dictionaries

This commit is contained in:
James Newton-King
2015-10-03 14:10:39 +13:00
parent 352c9e0e9f
commit ad68ea8780
22 changed files with 477 additions and 83 deletions
@@ -54,7 +54,7 @@ namespace Newtonsoft.Json.Tests.Utilities
{
ConstructorInfo constructor = TestReflectionUtils.GetConstructors(typeof(OutAndRefTestClass)).Single(c => c.GetParameters().Count() == 1);
var creator = LateBoundReflectionDelegateFactory.Instance.CreateParametrizedConstructor(constructor);
var creator = LateBoundReflectionDelegateFactory.Instance.CreateParameterizedConstructor(constructor);
object[] args = new object[] { "Input" };
OutAndRefTestClass o = (OutAndRefTestClass)creator(args);
@@ -67,7 +67,7 @@ namespace Newtonsoft.Json.Tests.Utilities
{
ConstructorInfo constructor = TestReflectionUtils.GetConstructors(typeof(OutAndRefTestClass)).Single(c => c.GetParameters().Count() == 2);
var creator = LateBoundReflectionDelegateFactory.Instance.CreateParametrizedConstructor(constructor);
var creator = LateBoundReflectionDelegateFactory.Instance.CreateParameterizedConstructor(constructor);
object[] args = new object[] { "Input", null };
OutAndRefTestClass o = (OutAndRefTestClass)creator(args);
@@ -80,7 +80,7 @@ namespace Newtonsoft.Json.Tests.Utilities
{
ConstructorInfo constructor = TestReflectionUtils.GetConstructors(typeof(OutAndRefTestClass)).Single(c => c.GetParameters().Count() == 3);
var creator = LateBoundReflectionDelegateFactory.Instance.CreateParametrizedConstructor(constructor);
var creator = LateBoundReflectionDelegateFactory.Instance.CreateParameterizedConstructor(constructor);
object[] args = new object[] { "Input", true, null };
OutAndRefTestClass o = (OutAndRefTestClass)creator(args);