Ejemplo n.º 1
0
 /// <summary>
 /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
 /// </summary>
 public void Dispose()
 {
     if (_httpServer != null && _httpServer.IsStarted)
     {
         _httpServer.StopAsync();
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Releases unmanaged and - optionally - managed resources.
 /// </summary>
 /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (_httpServer != null)
     {
         _httpServer.StopAsync();
     }
 }
Ejemplo n.º 3
0
        public void Stop()
        {
            var result = _httpServer?.StopAsync();

            if (result != null)
            {
                result.Wait();          //wait for stop to actually happen
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public void Dispose()
        {
            if (_httpServer != null && _httpServer.IsStarted)
            {
                _httpServer.StopAsync();
            }

            if (_watcher != null)
            {
                _watcher.EnableRaisingEvents = false;
                _watcher.Dispose();
                _watcher = null;
            }
        }
Ejemplo n.º 5
0
        public void Stop()
        {
            var result = _httpServer?.StopAsync();

            result?.Wait(); // wait for stop to actually happen
        }
Ejemplo n.º 6
0
 public void Stop()
 {
     _httpServer?.StopAsync();
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Releases unmanaged and - optionally - managed resources.
 /// </summary>
 /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
 protected virtual void Dispose(bool disposing)
 {
     _httpServer?.StopAsync();
 }