Files
CliFx/CliFx.Tests/TestCommands/ExceptionCommand.cs
2019-11-13 20:31:48 +02:00

16 lines
384 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 Task ExecuteAsync(IConsole console) => throw new Exception(Message);
}
}