public static Type[] GetGenericArguments(this Type type) { return type.GetTypeInfo().GenericTypeArguments; }