mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
19 lines
462 B
C#
19 lines
462 B
C#
using System.Threading.Tasks;
|
|
using CliFx.Attributes;
|
|
|
|
namespace CliFx.Tests.Dummy.Commands
|
|
{
|
|
[Command]
|
|
public class HelloWorldCommand : ICommand
|
|
{
|
|
[CommandOption("target", EnvironmentVariableName = "ENV_TARGET")]
|
|
public string Target { get; set; } = "World";
|
|
|
|
public ValueTask ExecuteAsync(IConsole console)
|
|
{
|
|
console.Output.WriteLine($"Hello {Target}!");
|
|
|
|
return default;
|
|
}
|
|
}
|
|
} |