Skip to content

beta4 changes

Compare
Choose a tag to compare
@JordanMarr JordanMarr released this 07 Jun 19:49
· 52 commits to main since this release

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 like InvocationContext, CancellationToken, IConsole, etc.

  • ⭐ Added Input.Context() for passing InvocationContext to handler function.
    This replaces Input.InjectedDependency<'T>() because InvocationContext can be used to get a CancellationToken, 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 the InvocationContext to your handler function using the new Input.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