Skip to content

Commit 6b90586

Browse files
committed
documentation, different call identifier, version bump, updated dependency
1 parent 3963007 commit 6b90586

File tree

2 files changed

+28
-20
lines changed

2 files changed

+28
-20
lines changed

src/Generator.Client.CommandLine/ConsoleApplication.cs

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,25 @@
1111

1212
namespace 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))

src/Generator.Client.CommandLine/Generator.Client.CommandLine.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
<Company />
1010
<Product>Amusoft.VisualStudio.TemplateGenerator.CommandLine</Product>
1111
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
12-
<ToolCommandName>amusoft-vs-templategenerator</ToolCommandName>
12+
<ToolCommandName>amusoft.vs.tg</ToolCommandName>
1313
<Copyright>2020</Copyright>
1414
<RepositoryType>git</RepositoryType>
1515
<PackageTags>visual studio template generator</PackageTags>
1616
<RepositoryUrl>https://github.com/taori/Amusoft.VisualStudio.TemplateGenerator.git</RepositoryUrl>
1717
<PackageProjectUrl>https://github.com/taori/Amusoft.VisualStudio.TemplateGenerator.git</PackageProjectUrl>
18-
<VersionPrefix>1.1.0</VersionPrefix>
18+
<VersionPrefix>2.0.0</VersionPrefix>
1919
</PropertyGroup>
2020

2121
<ItemGroup>
@@ -29,7 +29,7 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="CommandDotNet" Version="2.7.5" />
32+
<PackageReference Include="CommandDotNet" Version="2.8.2" />
3333
<PackageReference Include="JetBrains.Annotations" Version="2018.2.1" />
3434
<PackageReference Include="NLog" Version="4.6.8" />
3535
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0" />

0 commit comments

Comments
 (0)