diff --git a/eng/Version.Details.props b/eng/Version.Details.props index c4f0b4f1a0..c4909dbff2 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -1,4 +1,3 @@ - 2.0.0 - rc - 1 + rtm + diff --git a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt index f19908599f..6f542d6fe6 100644 --- a/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt +++ b/src/System.CommandLine.ApiCompatibility.Tests/ApiCompatibilityApprovalTests.System_CommandLine_api_is_not_changed.approved.txt @@ -193,7 +193,6 @@ System.CommandLine.Invocation public abstract class CommandLineAction public System.Boolean ClearsParseErrors { get; } public System.Boolean Terminating { get; } - protected System.Void set_Terminating(System.Boolean value) public class ParseErrorAction : SynchronousCommandLineAction .ctor() public System.Boolean ShowHelp { get; set; } diff --git a/src/System.CommandLine.Tests/TestActions.cs b/src/System.CommandLine.Tests/TestActions.cs index eb948b3cce..ab44b12926 100644 --- a/src/System.CommandLine.Tests/TestActions.cs +++ b/src/System.CommandLine.Tests/TestActions.cs @@ -23,6 +23,8 @@ public SynchronousTestAction( public override bool ClearsParseErrors { get; } + public override bool Terminating { get; } + public override int Invoke(ParseResult parseResult) { _invoke(parseResult); @@ -46,6 +48,8 @@ public AsynchronousTestAction( public override bool ClearsParseErrors { get; } + public override bool Terminating { get; } + public override Task InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken = default) { _invoke(parseResult); diff --git a/src/System.CommandLine/EnvironmentVariablesDirective.cs b/src/System.CommandLine/EnvironmentVariablesDirective.cs index ce6047614f..0d64619f76 100644 --- a/src/System.CommandLine/EnvironmentVariablesDirective.cs +++ b/src/System.CommandLine/EnvironmentVariablesDirective.cs @@ -32,9 +32,10 @@ private sealed class EnvironmentVariablesDirectiveAction : SynchronousCommandLin internal EnvironmentVariablesDirectiveAction(EnvironmentVariablesDirective directive) { _directive = directive; - Terminating = false; } + public override bool Terminating => false; + public override int Invoke(ParseResult parseResult) { SetEnvVars(parseResult); diff --git a/src/System.CommandLine/Invocation/CommandLineAction.cs b/src/System.CommandLine/Invocation/CommandLineAction.cs index 0a9cbe5ad9..5e873f08cb 100644 --- a/src/System.CommandLine/Invocation/CommandLineAction.cs +++ b/src/System.CommandLine/Invocation/CommandLineAction.cs @@ -15,7 +15,7 @@ private protected CommandLineAction() /// /// Indicates that the action terminates a command line invocation, and later actions are skipped. /// - public bool Terminating { get; protected init; } = true; + public virtual bool Terminating => true; /// /// Indicates that the action clears any parse errors associated with symbols other than one that owns the .