mirror of
https://github.com/fergalmoran/snapp-cli.git
synced 2025-12-25 19:40:42 +00:00
Initial commit
This commit is contained in:
17
Commands/DebugCommand.cs
Normal file
17
Commands/DebugCommand.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel;
|
||||
using Spectre.Console.Cli;
|
||||
|
||||
namespace Snapp.Cli.Commands;
|
||||
|
||||
public class DebugCommand : AsyncCommand<DebugCommand.Settings> {
|
||||
public class Settings : CommandSettings {
|
||||
[CommandArgument(1, "<ECHO-TEXT>")]
|
||||
[Description("Gimme some text to echo.")]
|
||||
public string? EchoText { get; set; }
|
||||
}
|
||||
|
||||
public override async Task<int> ExecuteAsync(CommandContext context, Settings settings) {
|
||||
Console.WriteLine($"Echoing: {settings.EchoText}");
|
||||
return await Task.FromResult(3);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user