예제 #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);
 }
예제 #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);
            }
        }
예제 #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);
            }
        }