/// <inheritdoc/> public void Dispose() { if (_server != null) { _server.ShutdownAsync().Wait(); } }
/// <summary> /// Disposes resources. /// </summary> /// <param name="disposeManagedResources">Whether to dispose managed resources.</param> protected virtual void Dispose(bool disposeManagedResources) { if (_disposed) { return; } _server.ShutdownAsync().GetAwaiter().GetResult(); _disposed = true; }
/// <inheritdoc/> public void Dispose() { _server?.ShutdownAsync().Wait(); }