public static Type GetArgumentType (Type type) { CheckIsGenericType(type, "GetArgumentType"); return type.GetGenericArguments()[0]; }
private static IList CreateList(Type propertyType) { Type argumentType = ResolverHelper.GetArgumentType(propertyType); Type listType = typeof(List <>).MakeGenericType(argumentType); return(Activator.CreateInstance(listType) as IList); }