1111
1212namespace Generator . Client . CommandLine
1313{
14+ [ ApplicationMetadata (
15+ Name = "amusoft.vs.tg" ) ]
1416 public class ConsoleApplication
1517 {
1618 private static readonly ILogger Log = LogManager . GetLogger ( nameof ( ConsoleApplication ) ) ;
1719
1820 [ ApplicationMetadata (
19- Description = "Tries to build a template according the the specified configuration" ,
21+ Description = "Tries to build a template according the the specified configuration. " ,
2022 Syntax = "build [configName] [option: -s pathToStorage]"
2123 ) ]
2224 public async Task < int > Build (
2325 [ Argument (
2426 Name = "config" ,
25- Description = "Name of configuration within configuration store " ) ]
27+ Description = "id or name of the configuration to build. " ) ]
2628 string configurationId ,
27- [ Option ( ShortName = "s" ) ]
29+ [ Option (
30+ Description = "Path to storage." ,
31+ ShortName = "s" ,
32+ LongName = "storage" ) ]
2833 string storage = null
2934 )
3035 {
@@ -58,14 +63,17 @@ public async Task<int> Build(
5863 return 1 ;
5964 }
6065 }
61-
66+
6267 [ SubCommand ]
63- [ ApplicationMetadata ( Description = "Entry point for obtaining information " ) ]
64- public class Get
68+ [ ApplicationMetadata ( Description = "Entry point for configurations " ) ]
69+ public class Configuration
6570 {
6671 [ ApplicationMetadata ( Description = "Retrieves a list of all configurations contained in the storage." ) ]
67- public async Task < int > Configurations (
68- [ Option ( ShortName = "s" ) ]
72+ public async Task < int > GetAll (
73+ [ Option (
74+ Description = "Path to storage." ,
75+ ShortName = "s" ,
76+ LongName = "storage" ) ]
6977 string storage = null )
7078 {
7179 if ( ! ConsoleUtils . TryGetManager ( storage , out var manager ) )
@@ -74,24 +82,24 @@ public async Task<int> Configurations(
7482 for ( var index = 0 ; index < configurations . Length ; index ++ )
7583 {
7684 var configuration = configurations [ index ] ;
77- Console . WriteLine ( $ "(#{ index + 1 : 00} ): { configuration . ConfigurationName } ") ;
85+ Console . WriteLine ( $ "(#{ index + 1 : 00} ): { configuration . ConfigurationName } ") ;
7886 }
7987
8088 return 0 ;
8189 }
82- }
8390
84- [ SubCommand ]
85- [ ApplicationMetadata ( Description = "Entry point for modifying configurations" ) ]
86- public class Configuration
87- {
8891 [ ApplicationMetadata ( Description = "Renames the configuration if it can be found through the given id." ) ]
8992 public async Task < int > Rename (
90- [ Argument ( Description = "id of configuration which can be the position of the configuration, its guid, or the configuration name" ) ]
93+ [ Argument (
94+ Description = "id of configuration which can be the position of the configuration, its guid, or the configuration name" ) ]
9195 string id ,
92- [ Argument ( Description = "new name of the configuration" ) ]
96+ [ Argument (
97+ Description = "new name of the configuration" ) ]
9398 string newName ,
94- [ Option ( ShortName = "s" ) ]
99+ [ Option (
100+ Description = "Path to storage." ,
101+ ShortName = "s" ,
102+ LongName = "storage" ) ]
95103 string storage = null )
96104 {
97105 if ( ! ConsoleUtils . TryGetManager ( storage , out var manager ) )
0 commit comments