예제 #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();
     }
 }
예제 #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();
     }
 }
예제 #3
0
        public void Stop()
        {
            var result = _httpServer?.StopAsync();

            if (result != null)
            {
                result.Wait();          //wait for stop to actually happen
            }
        }
예제 #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;
            }
        }
예제 #5
0
        public void Stop()
        {
            var result = _httpServer?.StopAsync();

            result?.Wait(); // wait for stop to actually happen
        }
예제 #6
0
 public void Stop()
 {
     _httpServer?.StopAsync();
 }
예제 #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();
 }