Add ability to pass example args using params syntax (#1166)

This commit is contained in:
Andrii Rublov
2023-05-12 04:08:42 -07:00
committed by GitHub
parent dac2097321
commit 404b052a5f
6 changed files with 18 additions and 20 deletions

View File

@ -9,7 +9,7 @@ internal sealed class CommandConfigurator : ICommandConfigurator
Command = command;
}
public ICommandConfigurator WithExample(string[] args)
public ICommandConfigurator WithExample(params string[] args)
{
Command.Examples.Add(args);
return this;

View File

@ -20,7 +20,7 @@ internal sealed class Configurator : IUnsafeConfigurator, IConfigurator, IConfig
Examples = new List<string[]>();
}
public void AddExample(string[] args)
public void AddExample(params string[] args)
{
Examples.Add(args);
}