Files
CliFx/CliFx.Tests/TestCommands/ExceptionCommand.cs
2019-10-30 18:37:32 +02:00

17 lines
444 B
C#

using System;
using System.Threading;
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, CancellationToken cancellationToken) => throw new Exception(Message);
}
}