From f3cc9f2e8db2b13e0388d39bab2905614bfabede Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 13:16:18 +0000 Subject: [PATCH 1/2] Bump System.CommandLine from 2.0.0-beta4.24528.1 to 2.0.0-beta4.25072.1 Bumps [System.CommandLine](https://github.com/dotnet/command-line-api) from 2.0.0-beta4.24528.1 to 2.0.0-beta4.25072.1. - [Release notes](https://github.com/dotnet/command-line-api/releases) - [Changelog](https://github.com/dotnet/command-line-api/blob/main/docs/History.md) - [Commits](https://github.com/dotnet/command-line-api/commits) --- updated-dependencies: - dependency-name: System.CommandLine dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index f2dab04..9584099 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -35,7 +35,7 @@ - + From a139007a204e832a8fea9de482325706eef5d683 Mon Sep 17 00:00:00 2001 From: Bert Date: Thu, 23 Jan 2025 15:32:44 +0100 Subject: [PATCH 2/2] update names --- src/ConsoleApp/SampleConsoleApp/Program.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ConsoleApp/SampleConsoleApp/Program.cs b/src/ConsoleApp/SampleConsoleApp/Program.cs index 9bae232..bed613d 100644 --- a/src/ConsoleApp/SampleConsoleApp/Program.cs +++ b/src/ConsoleApp/SampleConsoleApp/Program.cs @@ -1,6 +1,6 @@ using System.CommandLine; -using System.CommandLine.Parsing; using System.CommandLine.Help; +using System.CommandLine.Parsing; namespace SampleConsoleApp { @@ -8,18 +8,18 @@ static class Program { static async Task Main(string[] args) { - CliOption delayOption = new("--delay") { Description = "delay in seconds", DefaultValueFactory = (_) => 42 }; - CliOption messageOption = new("--message") { Required = true }; + Option delayOption = new("--delay") { Description = "delay in seconds", DefaultValueFactory = (_) => 42 }; + Option messageOption = new("--message") { Required = true }; - CliRootCommand rootCommand = new("CommandLine example"); + RootCommand rootCommand = new("CommandLine example"); rootCommand.Add(delayOption); rootCommand.Add(messageOption); rootCommand.Add(new HelpOption()); rootCommand.Add(new VersionOption() { Description = "SampleConsoleApp version" }); - var parseResult = CliParser.Parse(rootCommand, args); + var parseResult = CommandLineParser.Parse(rootCommand, args); - CliConfiguration config = new CliConfiguration(rootCommand); + CommandLineConfiguration config = new CommandLineConfiguration(rootCommand); rootCommand.SetAction(_ => {