mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
27 lines
709 B
C#
27 lines
709 B
C#
using BenchmarkDotNet.Attributes;
|
|
using clipr;
|
|
|
|
namespace CliFx.Benchmarks
|
|
{
|
|
public partial class Benchmarks
|
|
{
|
|
public class CliprCommand
|
|
{
|
|
[NamedArgument('s', "str")]
|
|
public string? StrOption { get; set; }
|
|
|
|
[NamedArgument('i', "int")]
|
|
public int IntOption { get; set; }
|
|
|
|
[NamedArgument('b', "bool", Constraint = NumArgsConstraint.Optional, Const = true)]
|
|
public bool BoolOption { get; set; }
|
|
|
|
public void Execute()
|
|
{
|
|
}
|
|
}
|
|
|
|
[Benchmark(Description = "Clipr")]
|
|
public void ExecuteWithClipr() => CliParser.Parse<CliprCommand>(Arguments).Execute();
|
|
}
|
|
} |