Files
CliFx/CliFx.Tests.Dummy/Commands/EnvironmentTestCommand.cs
Alexey Golub 7d3d79b861 Refactor (#94)
2021-03-21 09:54:00 +02:00

20 lines
519 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;
}
}
}