Пример #1
0
        public static void Main(string[] args)
        {
            var host = new WebHostBuilder()
                       .UseKestrel()
                       .UseContentRoot(ContentRootLocator.GetContentRoot(args) ?? Directory.GetCurrentDirectory())
                       .UseIISIntegration()
                       .UseStartup <Startup>()
                       .UseApplicationInsights()
                       .Build();

            if (Lynicon.Commands.CommandRunner.InterceptAndRunCommands(host.Services, args))
            {
                return;
            }

            host.Run();
        }
Пример #2
0
 public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
 WebHost.CreateDefaultBuilder(args)
 .UseContentRoot(ContentRootLocator.GetContentRoot(args) ?? Directory.GetCurrentDirectory())
 .UseStartup <Startup>();