public void Dispose() { while (_disposables.Count > 0) { try { _disposables.Pop().Dispose(); } catch { // Suppressing all exceptions because we unable // to handle them correctly when host is shutdowning } } }