Files
CliFx/CliFx.Tests/TestCommands/ExceptionCommand.cs
Alexey Golub 6ce52c70f7 Use ValueTask
2019-12-16 22:16:16 +02:00

16 lines
389 B
C#

using System;
using System.Threading.Tasks;
using CliFx.Attributes;
using CliFx.Services;
namespace CliFx.Tests.TestCommands
{
[Command("exc")]
public class ExceptionCommand : ICommand
{
[CommandOption("msg", 'm')]
public string? Message { get; set; }
public ValueTask ExecuteAsync(IConsole console) => throw new Exception(Message);
}
}