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; } }
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; }
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; } }
public void Dispose() { _initScriptsLock.Dispose(); Runspace?.Dispose(); }
public void Dispose() { _sharedConnection?.Dispose(); _mutex.Dispose(); }