mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
18 lines
663 B
C#
18 lines
663 B
C#
using CliFx.Attributes;
|
|
using CliFx.Exceptions;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CliFx.Tests.Dummy.Commands
|
|
{
|
|
/// <summary>
|
|
/// Demos how to show help text from an organizational command.
|
|
/// </summary>
|
|
[Command("cmd", Description = "This is an organizational command. " +
|
|
"I don't do anything except provide a route to my subcommands. " +
|
|
"If you use just me, I print the help text to remind you of my subcommands.")]
|
|
public class ShowHelpTextOnCommandExceptionCommand : ICommand
|
|
{
|
|
public ValueTask ExecuteAsync(IConsole console) =>
|
|
throw new CommandException(null, showHelp: false);
|
|
}
|
|
} |