Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump System.CommandLine from 2.0.0-beta4.24528.1 to 2.0.0-beta4.25072.1 #360

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<PackageVersion Include="xunit.v3.runner.console" Version="1.0.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.0.1" />
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.24528.1" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.25072.1" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
<PackageVersion Include="System.IO.Pipelines" Version="8.0.0" />
Expand Down
12 changes: 6 additions & 6 deletions src/ConsoleApp/SampleConsoleApp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
using System.CommandLine;
using System.CommandLine.Parsing;
using System.CommandLine.Help;
using System.CommandLine.Parsing;

namespace SampleConsoleApp
{
static class Program
{
static async Task Main(string[] args)
{
CliOption<int> delayOption = new("--delay") { Description = "delay in seconds", DefaultValueFactory = (_) => 42 };
CliOption<string> messageOption = new("--message") { Required = true };
Option<int> delayOption = new("--delay") { Description = "delay in seconds", DefaultValueFactory = (_) => 42 };
Option<string> 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(_ =>
{
Expand Down
Loading