#2205 changed the CliAction.Terminating property from { get; protected set; } to { get; protected init; } here:
|
/// <summary> |
|
/// Indicates that the action terminates a command line invocation, and later actions are skipped. |
|
/// </summary> |
|
public bool Terminating { get; protected init; } = true; |
The init accessor cannot be directly called in C# 7; it requires at least C# 9. That makes the property difficult to initialize in these cases:
#1586 was a similar issue about the init accessor of Option.Arity, fixed in #1595 by changing to set.
#2205 changed the CliAction.Terminating property from
{ get; protected set; }to{ get; protected init; }here:command-line-api/src/System.CommandLine/Invocation/CliAction.cs
Lines 15 to 18 in 104bb34
The
initaccessor cannot be directly called in C# 7; it requires at least C# 9. That makes the property difficult to initialize in these cases:#1586 was a similar issue about the
initaccessor of Option.Arity, fixed in #1595 by changing toset.