public void Dispose() { if (!_disposed) { _listener.Dispose(); _disposed = true; } }
public void Dispose() { if (LockTimer != null) { LockTimer.Dispose(); } _innerListener.Dispose(); }
public void Dispose() { if (!_disposed) { _shutdownRegistration.Dispose(); _innerListener.Dispose(); _disposed = true; } }
/// <summary> /// Disoposes or finalises the object. /// </summary> /// <param name="disposing"></param> /// <remarks> /// Note that the object is sealed, hence this is private instead of protected virtual. /// </remarks> private void Dispose(bool disposing) { if (disposing) { if (_Original != null) { _Original.Dispose(); } } }
public void Dispose() { if (!_disposed) { _timer.Dispose(); _innerListener.Dispose(); _disposed = true; } }
public void Dispose() { if (!_disposed) { _listener.Dispose(); _loggerFactory?.Dispose(); _disposed = true; } }
public bool Stop() { foreach (var pathWatcher in _pathWatchers) { pathWatcher.Stop(); } _settingsListener.Dispose(); return(true); }
protected override void OnClosed(EventArgs e) { base.OnClosed(e); _listener?.Dispose(); _viewModel?.Dispose(); _eventPublisher?.Unregister <HideApplicationToTrayEvent>(this); _eventPublisher?.Unregister <ShowApplicationEvent>(this); _eventPublisher?.Unregister <ShowErrorEvent>(this); _eventPublisher?.Unregister <ShutdownEvent>(this); }
protected virtual void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { _listener?.Dispose(); } _disposed = true; }
public void Dispose() { if (LockTimer != null) { LockTimer.Dispose(); } // When we Dispose, it's important that we release the lock if we // have it. ReleaseLockAsync().GetAwaiter().GetResult(); _innerListener.Dispose(); }
public bool RemoveStreamListener(string fixtureId) { _logger.InfoFormat("Removing listener for fixtureId={0}", fixtureId); IListener listener = null; _listeners.TryRemove(fixtureId, out listener); if (listener != null) { listener.Dispose(); OnStreamRemoved(fixtureId); } return(listener != null); }
protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { IListener listener_ = simpleListener; simpleListener = null; if (listener_ != null) { listener_.Dispose(); listener_ = null; } } disposedValue = true; } }
public void Dispose() { if (!_disposed) { _cancellationRegistration.Dispose(); // StartAsync might still be using this cancellation token. // Mark it canceled but don't dispose of the source while the callers are running. // Otherwise, callers would receive ObjectDisposedException when calling token.Register. // For now, rely on finalization to clean up _shutdownTokenSource's wait handle (if allocated). _cancellationSource.Cancel(); if (_listener != null) { _listener.Dispose(); } _disposed = true; } }
public void Dispose() => _listener.Dispose();
/// <summary> /// IDisposable implemented for our connection to the primary AG database server. /// </summary> public void Dispose() { _listener?.Dispose(); }
public void Dispose() { _listener.Dispose(); _retryCancellationTokenSource?.Cancel(); _semaphoreSlim.Dispose(); }
public void Dispose() { _innerListener.Dispose(); }
public void Dispose() { listener.Dispose(); announcer.Dispose(); }
/// <summary> /// Called when the object is being disposed. /// </summary> /// <param name="disposing">Whether this method is called from <see cref="Dispose()"/>.</param> protected virtual void Dispose(bool disposing) { inner.Dispose(); }