You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/ConsoleAppFramework/ConsoleAppBaseCode.cs
+64-45Lines changed: 64 additions & 45 deletions
Original file line number
Diff line number
Diff line change
@@ -50,8 +50,10 @@ internal record ConsoleAppContext
50
50
public string CommandName { get; init; }
51
51
public string[] Arguments { get; init; }
52
52
public object? State { get; init; }
53
+
public object? GlobalOptions { get; init; }
53
54
internal int CommandDepth { get; }
54
55
internal int EscapeIndex { get; }
56
+
internal string[] InternalCommandArgs { get; }
55
57
56
58
public ReadOnlySpan<string> CommandArguments
57
59
{
@@ -67,11 +69,13 @@ public ReadOnlySpan<string> EscapedArguments
67
69
: Arguments.AsSpan(EscapeIndex + 1);
68
70
}
69
71
70
-
public ConsoleAppContext(string commandName, string[] arguments, object? state, int commandDepth, int escapeIndex)
72
+
public ConsoleAppContext(string commandName, string[] arguments, string[] commandArgs, object? state, object? globalOptions, int commandDepth, int escapeIndex)
71
73
{
72
74
this.CommandName = commandName;
73
75
this.Arguments = arguments;
76
+
this.InternalCommandArgs = commandArgs;
74
77
this.State = state;
78
+
this.GlobalOptions = globalOptions;
75
79
this.CommandDepth = commandDepth;
76
80
this.EscapeIndex = escapeIndex;
77
81
}
@@ -373,33 +377,6 @@ static void ShowVersion()
373
377
374
378
static partial void ShowHelp(int helpId);
375
379
376
-
static async Task RunWithFilterAsync(string commandName, string[] args, int commandDepth, int escapeIndex, ConsoleAppFilter invoker, CancellationToken cancellationToken)
377
-
{
378
-
using var posixSignalHandler = PosixSignalHandler.Register(Timeout, cancellationToken);
0 commit comments