1- # System.CommandLine.Minimal
1+ # MinimalCli
22
3- > A source generator that sits on top of the ` System.CommandLine ` namespace
3+ > A source generator that works with the ` System.CommandLine ` namespace
44> to give an experience similar to the ASP.Net Core minimal API builders. This library
55> uses the Hosting libraries so a dotnet developer feels at home.
66>
@@ -52,7 +52,7 @@ will map the parameter `message` to a string Argument called `<Message>`.
5252
5353Add a reference to the nuget package ` MinimalCommandLine ` .
5454
55- - Via csproj: ` <PackageReference Include="MinimalCommandLine" Version="0.5.0.10 " /> `
55+ - Via csproj: ` <PackageReference Include="MinimalCommandLine" Version="2.0.0.36 " /> `
5656- Via dotnet cli: ` dotnet package add MinimalCommandLine `
5757- Via Visual Studio Menu:
5858 * Tools >
@@ -74,7 +74,7 @@ using MinimalCli;
7474
7575public class MyCommand
7676{
77- [Handler (" mycommand " )]
77+ [Handler (" my-command " )]
7878 public void Run (string myArgument , string ? myOption = null )
7979 {
8080 Console .WriteLine (" Arg:{0}, Option:{0}" , myArgument , myOption );
@@ -83,14 +83,14 @@ public class MyCommand
8383```
8484
8585This registers the following:
86- * A command called ` mycommand ` to the handler ` void Run(..) ` .
86+ * A command called ` my-command ` to the handler ` void Run(..) ` .
8787 * The parameter ` myArgument ` to an Argument called ` <MyArgument> ` .
8888 * The optional parameter ` myOption ` to an Option called ` --my-option ` .
8989
9090The command can be called like this:
9191
9292``` bash
93- mycommand " Foo" --my-option " Bar"
93+ my-command " Foo" --my-option " Bar"
9494```
9595
9696Conventionally a ` System.CommandLine.Argument ` is created when the parameter is required and
@@ -105,7 +105,7 @@ using MinimalCli;
105105
106106public class MyCommand
107107{
108- [Handler (" mycommand " )]
108+ [Handler (" my-command " )]
109109 public void Execute (string myArgument , [Argument ] string ? myArgument2 = null )
110110 {
111111 Console .WriteLine (" Arg:{0}, Arg2:{0}" , myArgument , myArgument2 );
0 commit comments