public void Dispose()
 {
     if (!_disposed)
     {
         _listener.Dispose();
         _disposed = true;
     }
 }
        public void Dispose()
        {
            if (LockTimer != null)
            {
                LockTimer.Dispose();
            }

            _innerListener.Dispose();
        }
Exemplo n.º 3
0
        public void Dispose()
        {
            if (!_disposed)
            {
                _shutdownRegistration.Dispose();
                _innerListener.Dispose();

                _disposed = true;
            }
        }
Exemplo n.º 4
0
 /// <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;
            }
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 8
0
        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);
        }
Exemplo n.º 9
0
 protected virtual void Dispose(bool disposing)
 {
     if (_disposed)
     {
         return;
     }
     if (disposing)
     {
         _listener?.Dispose();
     }
     _disposed = true;
 }
Exemplo n.º 10
0
        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;
            }
        }
Exemplo n.º 14
0
 public void Dispose() => _listener.Dispose();
Exemplo n.º 15
0
 /// <summary>
 ///   IDisposable implemented for our connection to the primary AG database server.
 /// </summary>
 public void Dispose()
 {
     _listener?.Dispose();
 }
Exemplo n.º 16
0
 public void Dispose()
 {
     _listener.Dispose();
     _retryCancellationTokenSource?.Cancel();
     _semaphoreSlim.Dispose();
 }
Exemplo n.º 17
0
 public void Dispose()
 {
     _innerListener.Dispose();
 }
Exemplo n.º 18
0
 public void Dispose()
 {
     listener.Dispose();
     announcer.Dispose();
 }
Exemplo n.º 19
0
 /// <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();
 }