Closed
Description
This is related to #2084.
The API would be on the CommandLineBuilder
:
void UseInvocationContextFactory(Func<ParseResult, IConsole?, InvocationContext> factory);
Or mutable CommandLineConfiguration
:
Func<ParseResult, IConsole?, InvocationContext> InvocationContextFactory { get; set; }
If the instance is IDisposable
/IAsyncDisposable
, it should be disposed at the end of the invocation.
Similarly, it would be interesting to have a way of controlling the default console:
void UseConsole(Func<ParseResult, IConsole> factory);
// or
Func<ParseResult, IConsole> ConsoleFactory { get; set; }
Metadata
Metadata
Assignees
Labels
No labels