Update CliFx to v1.0

This commit is contained in:
Alexey Golub 2020-01-30 16:34:36 +02:00
parent 37be80e9e1
commit 8a4f306012
12 changed files with 26 additions and 28 deletions

View file

@ -30,13 +30,13 @@ namespace DiscordChatExporter.Cli
return services.BuildServiceProvider();
}
public static Task<int> Main(string[] args)
public static async Task<int> Main(string[] args)
{
var serviceProvider = ConfigureServices();
return new CliApplicationBuilder()
return await new CliApplicationBuilder()
.AddCommandsFromThisAssembly()
.UseCommandFactory(schema => (ICommand) serviceProvider.GetService(schema.Type))
.UseTypeActivator(serviceProvider.GetService)
.Build()
.RunAsync(args);
}