using CustomHostingDemo.Logging; using Microsoft.Extensions.Logging; using Ninject; using System.CommandLine; using System.CommandLine.Builder; using System.CommandLine.Parsing; namespace CustomHostingDemo { class Program { static int Main(string[] args) { var kernel = new StandardKernel( new ConfigurationModule(), new LoggingModule(), new CommandHandlerModule() ); var logger = kernel.Get>(); logger.LogWarning("Hello"); var rootCommand = new RootCommand() { new HelloCommand().Bind(kernel), }; var parser = new CommandLineBuilder(rootCommand) .UseDefaults() .Build(); return parser.InvokeAsync(args).Result; } } }