Files
CliFx/CliFx.Tests.Dummy/Commands/EnvironmentTestCommand.cs
2021-12-08 23:43:35 +02:00

19 lines
473 B
C#

using System.Threading.Tasks;
using CliFx.Attributes;
using CliFx.Infrastructure;
namespace CliFx.Tests.Dummy.Commands;
[Command("env-test")]
public class EnvironmentTestCommand : ICommand
{
[CommandOption("target", EnvironmentVariable = "ENV_TARGET")]
public string GreetingTarget { get; set; } = "World";
public ValueTask ExecuteAsync(IConsole console)
{
console.Output.WriteLine($"Hello {GreetingTarget}!");
return default;
}
}