Skip to content

Commit 9f2fdd6

Browse files
Merge pull request #5 from matzefriedrich/feature/package-reference-update
Upgrades package references and adopts changes
2 parents 0618c8d + 7416ce0 commit 9f2fdd6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/System.CommandLine.Extensions/CommandLineApplication.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ public CommandOption Option<T>(string template, string description = null, IArgu
3333
throw new ArgumentException("Value cannot be null or whitespace.", nameof(template));
3434

3535
string[] aliases = template.Split(new[] {'|'}, StringSplitOptions.RemoveEmptyEntries);
36-
var option = new Option(aliases, description)
36+
Type argumentType = typeof(T);
37+
var option = new Option(aliases, description, argumentType, arity: argumentArity)
3738
{
38-
Argument = new Argument<T> {Arity = argumentArity},
39-
IsRequired = Nullable.GetUnderlyingType(typeof(T)) == null
39+
IsRequired = Nullable.GetUnderlyingType(argumentType) == null
4040
};
4141

4242
this.command.AddOption(option);

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.0</TargetFramework>
5-
<PackageVersion>2.0.0-beta1.20574.7</PackageVersion>
5+
<PackageVersion>2.0.0-beta1.21216.1</PackageVersion>
66
<Authors>Matthias Friedrich</Authors>
77
<Description>A slim command configuration and execution layer similar to Microsoft.Extensions.CommandlineUtils.</Description>
8-
<Copyright>2020 by Matthias Friedrich</Copyright>
8+
<Copyright>2020 - 2021 by Matthias Friedrich</Copyright>
99
<RepositoryUrl>https://github.com/matzefriedrich/command-line-api-extensions</RepositoryUrl>
1010
<RepositoryType>git</RepositoryType>
1111
<PackageTags>CLI</PackageTags>
@@ -31,7 +31,7 @@
3131
</PropertyGroup>
3232

3333
<ItemGroup>
34-
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.20574.7" />
34+
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21216.1" />
3535
</ItemGroup>
3636

3737
</Project>

0 commit comments

Comments
 (0)