mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-07-05 03:58:16 +08:00
Add ability to pass example args using params
syntax (#1166)
This commit is contained in:
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user