Exemplo n.º 1
0
 private bool disposed = false; // to detect redundant calls
 protected override void Dispose(bool disposing)
 {
     if (!disposed)
     {
         if (disposing)
         {
             // dispose-only, i.e. non-finalizable logic
             _dashboardService?.Dispose();
         }
         disposed = true;
     }
     base.Dispose(disposing);
 }
Exemplo n.º 2
0
        public void Stop()
        {
            if (this.Running && this.host != null)
            {
                this.Running = false;
                this.host.Dispose();

                DashboardService.Dispose();

                Servers.Remove(this);

                _reloader.StopWatchingFile(FileName);
            }
        }
Exemplo n.º 3
0
        public void Stop()
        {
            if (this.Running && this.host != null)
            {
                this.Running = false;

                this.host.StopAsync(TimeSpan.FromSeconds(1)).Wait();

                DashboardService.Dispose();

                Servers.Remove(this);

                _reloader.StopWatchingFile(FileName);
            }
        }