Beispiel #1
0
        protected override void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            lock (SyncObject)
            {
                if (m_Stack == null)
                {
                    return;
                }

                foreach (var item in m_Stack)
                {
                    if (item is IDisposable disposable)
                    {
                        disposable.Dispose();
                    }
                }

                m_Semaphore.Dispose();
                m_Stack     = null;
                m_Activator = null;
            }
        }
Beispiel #2
0
 public void Dispose()
 {
     _restoreEvents.SolutionRestoreCompleted -= RestoreEvents_SolutionRestoreCompleted;
     _initScriptsLock.Dispose();
     Runspace?.Dispose();
     _tokenSource?.Dispose();
 }
        public void Dispose()
        {
            _foregroundDispatcher.AssertForegroundThread();

            _projectSnapshotManager.Changed -= ProjectSnapshotManager_Changed;
            _latestStateSemaphore.Dispose();
            _disposed = true;
        }
        public void Dispose()
        {
            if (!_isDisposed)
            {
                _asyncSemaphore.Dispose();
                _sourceCacheContext?.Dispose();

                GC.SuppressFinalize(this);
            }

            _isDisposed = true;
        }
Beispiel #5
0
        protected virtual void Dispose(bool disposing)
        {
            if (!_disposedValue)
            {
                if (disposing)
                {
                    if (_serviceBrokerClient.IsValueCreated)
                    {
                        _serviceBrokerClient.GetValue().Dispose();
                    }
                    try
                    {
                        CloseChannelAsync().GetAwaiter().GetResult();
                    }
                    catch
                    {
                        // Ignore exceptions
                    }

                    _pipeLock.Dispose();
                }
                _disposedValue = true;
            }
        }
Beispiel #6
0
 public void Dispose()
 {
     _initScriptsLock.Dispose();
     Runspace?.Dispose();
 }
Beispiel #7
0
 public void Dispose()
 {
     _sharedConnection?.Dispose();
     _mutex.Dispose();
 }