Esempio n. 1
0
 private void InvokeHostStop()
 {
     if (ServiceHosts.Any())
     {
         foreach (var host in ServiceHosts)
         {
             host.Stop();
         }
     }
 }
Esempio n. 2
0
 public void Start()
 {
     if (webHost == null)
     {
         IWebHostBuilder webHostBuilder = WebHost.CreateDefaultBuilder().UseUrls(Url)
                                          .Configure(app => Configure(app)).ConfigureServices(services => ConfigureServices(services));
         if (ServiceHosts.Any())
         {
             webHost = webHostBuilder.Build();
         }
     }
     webHost.Run();
 }