-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
31 lines (25 loc) · 1014 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using System.CommandLine;
using vz_generator;
using vz_generator.Commands;
using vz_generator.Initializer;
using vz_generator.Localization;
using vz_generator.Renamer;
class Program
{
static async Task<int> Main(string[] args)
{
var rootCommand = new RootCommand(VzLocales.L(VzLocales.Keys.RootCommandDesc));
var initCommand = new InitCommand();
initCommand.SetHandler(InitCommand.InitAsync);
rootCommand.AddCommand(initCommand);
var generateCommand = new GenerateCommand();
generateCommand.AddAlias(VzConsts.GenerateCmd.Alias);
generateCommand.SetHandler(generateCommand.GenerateAsync);
rootCommand.AddCommand(generateCommand);
var renameCommand = new RenameCommand();
renameCommand.AddAlias(VzConsts.RenameCmd.Alias);
renameCommand.SetHandler(renameCommand.RenameAsync);
rootCommand.AddCommand(renameCommand);
return await rootCommand.InvokeAsync(args);
}
}