For declaring some command like this
[Command("run", "Run commandlet.")] public async Task RunCommandlet([Option(0)] string commandlet, [Option(1)] params string[] parameters)
if last indexed parameter is params then it will accept all leftover parameters from command line
For example myprog run CommandletName param1 param2 - param1 param2 will be put to parameters array
In case of myprog run CommandletName - parameters will be empty.
Sorry for big diff. converted all tabs to spaces as it should be in whole projec.t
For declaring some command like this
[Command("run", "Run commandlet.")] public async Task RunCommandlet([Option(0)] string commandlet, [Option(1)] params string[] parameters)
if last indexed parameter is params then it will accept all leftover parameters from command lineFor example
myprog run CommandletName param1 param2
- param1 param2 will be put to parameters array In case ofmyprog run CommandletName
- parameters will be empty.Sorry for big diff. converted all tabs to spaces as it should be in whole projec.t