Skip to content

Commit b41f11f

Browse files
Adds argument-arity parameter (#16)
1 parent 0a4a54d commit b41f11f

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/System.CommandLine.Extensions/CommandOptionExtensions.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ namespace System.CommandLine.Extensions
66
[SuppressMessage("ReSharper", "UnusedMember.Global")]
77
public static partial class CommandOptionExtensions
88
{
9-
public static CommandOption Option<T>(this CommandOption commandOption, string template, string? description = null)
9+
public static CommandOption Option<T>(this CommandOption commandOption, string template, string? description = null, ArgumentArity argumentArity = default)
1010
{
1111
if (commandOption == null) throw new ArgumentNullException(nameof(commandOption));
1212

13-
14-
return commandOption.Command.Option<T>(template, description);
13+
return commandOption.Command.Option<T>(template, description, argumentArity);
1514
}
1615

1716
public static void OnExecute(this CommandOption commandOption, Func<Task<int>> execute) => commandOption.Command.OnExecute(execute);

src/System.CommandLine.Extensions/System.CommandLine.Extensions.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<PackageVersion>2.1.0-beta4.22272.1</PackageVersion>
4+
<PackageVersion>2.1.1-beta4.22272.1</PackageVersion>
55
<Authors>Matthias Friedrich</Authors>
66
<Description>A slim command configuration and execution layer similar to Microsoft.Extensions.CommandlineUtils.</Description>
77
<Copyright>2020 - 2024 by Matthias Friedrich</Copyright>
@@ -11,8 +11,8 @@
1111
<LangVersion>default</LangVersion>
1212
<Nullable>enable</Nullable>
1313
<PackageReadmeFile>README.md</PackageReadmeFile>
14-
<AssemblyVersion>2.1.0.0</AssemblyVersion>
15-
<FileVersion>2.1.0.0</FileVersion>
14+
<AssemblyVersion>2.1.1.0</AssemblyVersion>
15+
<FileVersion>2.1.1.0</FileVersion>
1616
<TargetFrameworks>net8.0</TargetFrameworks>
1717
</PropertyGroup>
1818

0 commit comments

Comments
 (0)