mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-20 05:48:14 +08:00
Use file scoped namespace declarations
This commit is contained in:

committed by
Phil Scott

parent
1dbaf50935
commit
ec1188b837
@ -1,42 +1,41 @@
|
||||
namespace Spectre.Console.Cli
|
||||
namespace Spectre.Console.Cli;
|
||||
|
||||
internal sealed class CommandConfigurator : ICommandConfigurator
|
||||
{
|
||||
internal sealed class CommandConfigurator : ICommandConfigurator
|
||||
public ConfiguredCommand Command { get; }
|
||||
|
||||
public CommandConfigurator(ConfiguredCommand command)
|
||||
{
|
||||
public ConfiguredCommand Command { get; }
|
||||
|
||||
public CommandConfigurator(ConfiguredCommand command)
|
||||
{
|
||||
Command = command;
|
||||
}
|
||||
|
||||
public ICommandConfigurator WithExample(string[] args)
|
||||
{
|
||||
Command.Examples.Add(args);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICommandConfigurator WithAlias(string alias)
|
||||
{
|
||||
Command.Aliases.Add(alias);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICommandConfigurator WithDescription(string description)
|
||||
{
|
||||
Command.Description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICommandConfigurator WithData(object data)
|
||||
{
|
||||
Command.Data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICommandConfigurator IsHidden()
|
||||
{
|
||||
Command.IsHidden = true;
|
||||
return this;
|
||||
}
|
||||
Command = command;
|
||||
}
|
||||
}
|
||||
|
||||
public ICommandConfigurator WithExample(string[] args)
|
||||
{
|
||||
Command.Examples.Add(args);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICommandConfigurator WithAlias(string alias)
|
||||
{
|
||||
Command.Aliases.Add(alias);
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICommandConfigurator WithDescription(string description)
|
||||
{
|
||||
Command.Description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICommandConfigurator WithData(object data)
|
||||
{
|
||||
Command.Data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICommandConfigurator IsHidden()
|
||||
{
|
||||
Command.IsHidden = true;
|
||||
return this;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user