mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
26 lines
633 B
C#
26 lines
633 B
C#
using BenchmarkDotNet.Attributes;
|
|
using PowerArgs;
|
|
|
|
namespace CliFx.Benchmarks;
|
|
|
|
public partial class Benchmarks
|
|
{
|
|
public class PowerArgsCommand
|
|
{
|
|
[ArgShortcut("--str"), ArgShortcut("-s")]
|
|
public string? StrOption { get; set; }
|
|
|
|
[ArgShortcut("--int"), ArgShortcut("-i")]
|
|
public int IntOption { get; set; }
|
|
|
|
[ArgShortcut("--bool"), ArgShortcut("-b")]
|
|
public bool BoolOption { get; set; }
|
|
|
|
public void Main()
|
|
{
|
|
}
|
|
}
|
|
|
|
[Benchmark(Description = "PowerArgs")]
|
|
public void ExecuteWithPowerArgs() => Args.InvokeMain<PowerArgsCommand>(Arguments);
|
|
} |