mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Refactor (#94)
This commit is contained in:
25
CliFx.Benchmarks/Benchmarks.McMaster.cs
Normal file
25
CliFx.Benchmarks/Benchmarks.McMaster.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using McMaster.Extensions.CommandLineUtils;
|
||||
|
||||
namespace CliFx.Benchmarks
|
||||
{
|
||||
public partial class Benchmarks
|
||||
{
|
||||
public class McMasterCommand
|
||||
{
|
||||
[Option("--str|-s")]
|
||||
public string? StrOption { get; set; }
|
||||
|
||||
[Option("--int|-i")]
|
||||
public int IntOption { get; set; }
|
||||
|
||||
[Option("--bool|-b")]
|
||||
public bool BoolOption { get; set; }
|
||||
|
||||
public int OnExecute() => 0;
|
||||
}
|
||||
|
||||
[Benchmark(Description = "McMaster.Extensions.CommandLineUtils")]
|
||||
public int ExecuteWithMcMaster() => CommandLineApplication.Execute<McMasterCommand>(Arguments);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user