But when doing the following, it fails to generate because Func<> does not accept more than 16 arguments (it doesn't generate a delegate like the anonymous lambda does).
Argument 2: cannot convert from 'method group' to 'System.Func'
public partial class Test
{
public static void Main(string[] args)
{
var test = new Test();
ConsoleApp.Run(args, test.Handle);
}
public void Handle(
bool a1,
bool a2,
bool a3,
bool a4,
bool a5,
bool a6,
bool a7,
bool a8,
bool a9,
bool a10,
bool a11,
bool a12,
bool a13,
bool a14,
bool a15,
bool a16,
bool a17,
bool a18,
bool a19,
string a20 = "test"
)
{
//
}
}
Side question: would it be possible to make it support class constructors, so that I could use readonly fields for options? For example: ConsoleApp.Run<Test>(args);
This works:
But when doing the following, it fails to generate because Func<> does not accept more than 16 arguments (it doesn't generate a delegate like the anonymous lambda does).
Side question: would it be possible to make it support class constructors, so that I could use readonly fields for options? For example:
ConsoleApp.Run<Test>(args);