mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
23 lines
707 B
C#
23 lines
707 B
C#
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using CliFx.Attributes;
|
|
using CliFx.Services;
|
|
|
|
namespace CliFx.Tests.TestCommands
|
|
{
|
|
[Command("concat", Description = "Concatenate strings.")]
|
|
public class ConcatCommand : ICommand
|
|
{
|
|
[CommandOption('i', IsRequired = true, Description = "Input strings.")]
|
|
public IReadOnlyList<string> Inputs { get; set; }
|
|
|
|
[CommandOption('s', Description = "String separator.")]
|
|
public string Separator { get; set; } = "";
|
|
|
|
public ValueTask ExecuteAsync(IConsole console)
|
|
{
|
|
console.Output.WriteLine(string.Join(Separator, Inputs));
|
|
return default;
|
|
}
|
|
}
|
|
} |