Add ResponseFileHandling to CommandLineContext so it can be passed through the static CommandLineApp.Execute
danmoseley opened this issue · 2 comments
It's convenient to use the static method CommandLineApplication.Execute<ProgramArguments>(console, args);
(or async equivalent) but it does not allow ResponseFileHandling to be set to true.
One must use the instance methods, which likely involve pasting a bunch of code in, ie.,
It would be nice to have a way to pass ResponseFileHandling through the static method. It seems it could be conveniently added to CommandLineContext and no new API need be added. If a value is set on CommandLineContext, it should "win" over anything on CommandLineApplication.
linking microsoft/slngen#426
Actually, CommandLineContext classes are all internal, so it would need public CommandLineApplication(IConsole console, string workingDirectory, ResponseFileHandling responseFileHandling)
to be added. And of course there are other parameters on the instance CommandLineApplication that may be interesting to others, which would make a lot of overloads.
Disregard, I can use the declarative way.