public void Dispose() { if (_subscriptions != null && _pubsub != null) { foreach (var s in _subscriptions) { try { _pubsub.Cancel(s).ConfigureAwait(false); } catch { } } } _subscriptions.Clear(); _subscriptions = null; }