-Added JsonConstructorAttribute support for lists and dictionaries
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user