Files
CliFx/CliFx.Benchmarks/Benchmarks.Clipr.cs
Alexey Golub 7d3d79b861 Refactor (#94)
2021-03-21 09:54:00 +02:00

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();
}
}