2021-09-25 23:29:46 +10:00
|
|
|
|
using System.Collections.Immutable;
|
2021-09-25 23:04:18 +10:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Shamir.Console
|
|
|
|
|
{
|
2021-09-25 23:29:46 +10:00
|
|
|
|
public static class Program
|
2021-09-25 23:04:18 +10:00
|
|
|
|
{
|
2021-09-25 23:29:46 +10:00
|
|
|
|
public static async Task<int> Main(string[] args)
|
2021-09-25 23:04:18 +10:00
|
|
|
|
{
|
2021-09-25 23:29:46 +10:00
|
|
|
|
var tree = new DefaultCommandTree(
|
|
|
|
|
"shamir",
|
|
|
|
|
"command-line multitool",
|
|
|
|
|
ImmutableArray.Create<ICommandTree>(
|
2021-09-25 23:04:18 +10:00
|
|
|
|
|
2021-09-25 23:29:46 +10:00
|
|
|
|
),
|
|
|
|
|
ImmutableArray.Create<ICommand>(
|
2021-09-25 23:04:18 +10:00
|
|
|
|
|
2021-09-25 23:29:46 +10:00
|
|
|
|
)
|
2021-09-25 23:04:18 +10:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
var command = tree.FindCommand(args);
|
|
|
|
|
return await command.ExecuteAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|