mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-17 17:32:50 +08:00
17 lines
602 B
C#
17 lines
602 B
C#
namespace Spectre.Console.Cli;
|
|
|
|
/// <summary>
|
|
/// Represents a command.
|
|
/// </summary>
|
|
/// <typeparam name="TSettings">The settings type.</typeparam>
|
|
public interface ICommand<TSettings> : ICommandLimiter<TSettings>
|
|
where TSettings : CommandSettings
|
|
{
|
|
/// <summary>
|
|
/// Executes the command.
|
|
/// </summary>
|
|
/// <param name="context">The command context.</param>
|
|
/// <param name="settings">The settings.</param>
|
|
/// <returns>An integer indicating whether or not the command executed successfully.</returns>
|
|
Task<int> Execute(CommandContext context, TSettings settings);
|
|
} |