88>
99> The primary goal of this library is to give a developer the power to get started with
1010> System.CommandLine and to create commands with minimal boilerplate. All you have to do
11- > to turn a function into a command is decorate it with the ` [Command ] ` attribute!
11+ > to turn a function into a command is decorate it with the ` [Handler ] ` attribute!
1212
1313## Getting Started
1414
@@ -22,7 +22,7 @@ using System.CommandLine.Minimal;
2222public class HelloWorld
2323{
2424 // Just decorate the method with the command attribute!
25- [Command (" hello" )]
25+ [Handler (" hello" )]
2626 public void Execute (string message )
2727 {
2828 Console .WriteLine (" Hello World! {0}" , message );
@@ -74,7 +74,7 @@ using System.CommandLine.Minimal;
7474
7575public class MyCommand
7676{
77- [Command (" mycommand" )]
77+ [Handler (" mycommand" )]
7878 public void Run (string myArgument , string ? myOption = null )
7979 {
8080 Console .WriteLine (" Arg:{0}, Option:{0}" , myArgument , myOption );
@@ -105,7 +105,7 @@ using System.CommandLine.Minimal;
105105
106106public class MyCommand
107107{
108- [Command (" mycommand" )]
108+ [Handler (" mycommand" )]
109109 public void Execute (string myArgument , [Argument ] string ? myArgument2 = null )
110110 {
111111 Console .WriteLine (" Arg:{0}, Arg2:{0}" , myArgument , myArgument2 );
@@ -165,7 +165,7 @@ public class GreeterCommand
165165 _myInjectedClass = myInjectedClass ;
166166 }
167167
168- [Command (" greet" )]
168+ [Handler (" greet" )]
169169 public async Task ExecuteAsync (string name , string ? tone = null )
170170 {
171171 // ... use _myInjectedClass here
179179// a static class command
180180public static class GreeterCommand
181181{
182- [Command (" greet" )]
182+ [Handler (" greet" )]
183183 public static async Task ExecuteAsync (
184184 string name ,
185185 [FromServices ] MyInjectedClass myInjectedClass ,
0 commit comments