@@ -11,10 +11,11 @@ class Program
1111 {
1212 static async Task Main ( string [ ] args )
1313 {
14- //args = new string[] { "Bar.Hello3", "2" };
14+ //d
1515 //args = new string[] { "bar", "hello3", "-help" };
1616 //args = new string[] { "foo", "echo", "help"};
1717 //args = new string[] { "bar.hello2", "help" };
18+ args = new string [ ] { "foo-bar" , "ec" , "-msg" , "tako" } ;
1819
1920
2021 await Host . CreateDefaultBuilder ( )
@@ -39,12 +40,13 @@ await Host.CreateDefaultBuilder()
3940
4041 [ ConsoleAppFilter ( typeof ( MyFilter2 ) , Order = 9999 ) ]
4142 [ ConsoleAppFilter ( typeof ( MyFilter2 ) , Order = 9999 ) ]
42- public class Foo : ConsoleAppBase
43+ // [Command("AAA")]
44+ public class FooBar : ConsoleAppBase
4345 {
4446 [ Command ( "ec" , "My echo" ) ]
4547 public void Echo ( string msg )
4648 {
47- Console . WriteLine ( msg ) ;
49+ Console . WriteLine ( msg + "OK??" ) ;
4850 }
4951
5052 public void Sum ( int x , int y )
@@ -55,9 +57,16 @@ public void Sum(int x, int y)
5557
5658 public class Bar : ConsoleAppBase
5759 {
58- public void Hello2 ( )
60+ [ Command ( "ec" , "My echo" ) ]
61+ public void Hello2 ( string msg )
62+ {
63+ Console . WriteLine ( "H E L L O 2" ) ;
64+ }
65+
66+
67+ public void Sum ( int x , int y )
5968 {
60- Console . WriteLine ( "H E L L O" ) ;
69+ Console . WriteLine ( ( x + y ) . ToString ( ) ) ;
6170 }
6271 }
6372
0 commit comments