-Performance

-Added ConstructorHandling to allow object creation using non-public default constructors
This commit is contained in:
JamesNK
2009-10-10 06:09:15 +00:00
parent 75627d6292
commit 7e75bbdcf7
26 changed files with 388 additions and 54 deletions
@@ -334,17 +334,6 @@ namespace Newtonsoft.Json.Utilities
return result;
}
public static T[] CreateArray<T>(IEnumerable<T> enumerable)
{
ValidationUtils.ArgumentNotNull(enumerable, "enumerable");
if (enumerable is T[])
return (T[])enumerable;
List<T> tempList = new List<T>(enumerable);
return tempList.ToArray();
}
public static IList CreateGenericList(Type listType)
{
ValidationUtils.ArgumentNotNull(listType, "listType");