beta4 changes
v0.13.0-beta4 adapts to the System.CommandLine beta4 changes.
The API stays mostly the same with the following changes:
-
💥 Removed
Input.InjectedDependency<'T>()(this allowed you to pass in S.CL injected system dependencies likeInvocationContext,CancellationToken,IConsole, etc. -
⭐ Added
Input.Context()for passingInvocationContextto handler function.
This replacesInput.InjectedDependency<'T>()becauseInvocationContextcan be used to get aCancellationToken,IConsole, etc. -
Handler functions now support 8 input bindings instead of 16 (following changes to S.CL).
(If you need more than 8 input bindings, you can pass theInvocationContextto your handler function using the newInput.Context()method which will allow you to manually get as many parsed values as you want.)
The readme has been updated with an example of passing the InvocationContext:
https://github.com/JordanMarr/FSharp.SystemCommandLine#passing-the-invocationcontext