private object[] GetConstructorArgs(Type type)
{
var constructors = type.GetConstructors();
if (constructors.Any(_ => _.GetParameters().Length == 0))
{
return new object[0];
}
return constructors.First().GetParameters().Select(x => "a").Cast<object>().ToArray();
}
}