You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Autofac;
|
|
|
|
|
using CliFx;
|
|
|
|
|
using Trash.Command;
|
|
|
|
|
|
|
|
|
|
namespace Trash
|
|
|
|
|
{
|
|
|
|
|
internal static class Program
|
|
|
|
|
{
|
|
|
|
|
private static IContainer? _container;
|
|
|
|
|
|
|
|
|
|
public static async Task<int> Main()
|
|
|
|
|
{
|
|
|
|
|
_container = CompositionRoot.Setup();
|
|
|
|
|
return await new CliApplicationBuilder()
|
|
|
|
|
.AddCommandsFromThisAssembly()
|
|
|
|
|
.SetExecutableName(ThisAssembly.AssemblyName)
|
|
|
|
|
.SetVersion($"v{ThisAssembly.AssemblyInformationalVersion}")
|
|
|
|
|
.UseTypeActivator(type => CliTypeActivator.ResolveType(_container, type))
|
|
|
|
|
.Build()
|
|
|
|
|
.RunAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|