-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathProgram.cs
28 lines (23 loc) · 880 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
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using cman.Commands;
using Spectre.Console.Cli;
using Spectre.Console.Cli.Extensions.DependencyInjection;
IServiceCollection? serviceCollection = new ServiceCollection()
.AddLogging(configure =>
configure
.AddSimpleConsole(opts =>
{
opts.TimestampFormat = "yyyy-MM-dd HH:mm:ss ";
}));
using DependencyInjectionRegistrar? registrar = new DependencyInjectionRegistrar(serviceCollection);
CommandApp? app = new CommandApp(registrar);
app.Configure(
config =>
{
config.ValidateExamples();
config.AddCommand<DeployCommand>("deploy")
.WithDescription("Deploy a phantasma contract")
.WithExample(new[] { "deploy" });
});
return await app.RunAsync(args);