EnvDTE.Documents.CloseAll(EnvDTE.vsSaveChanges)

Here are the examples of the csharp api class EnvDTE.Documents.CloseAll(EnvDTE.vsSaveChanges) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

3 Examples 7

1. Example

View license
protected virtual void Dispose(bool disposing) {
            if (!_isDisposed) {
                _isDisposed = true;
                try {
                    if (_onDispose != null) {
                        foreach (var action in _onDispose) {
                            action();
                        }
                    }

                    if (_dte != null && _dte.Debugger.CurrentMode != dbgDebugMode.dbgDesignMode) {
                        _dte.Debugger.TerminateAll();
                        _dte.Debugger.Stop();
                    }
                    DismissAllDialogs();
                    for (int i = 0; i < 100 && !_skipCloseAll; i++) {
                        try {
                            _dte.Solution.Close(false);
                            break;
                        } catch {
                            _dte.Documents.CloseAll(EnvDTE.vsSaveChanges.vsSaveChangesNo);
                            System.Threading.Thread.Sleep(200);
                        }
                    }
                } catch (Exception ex) {
                    Debug.WriteLine("Exception disposing VisualStudioApp: {0}", ex);
                }
            }
        }

2. Example

Project: nodejstools
Source File: VisualStudioApp.cs
View license
protected virtual void Dispose(bool disposing)
        {
            if (!_isDisposed)
            {
                _isDisposed = true;
                try
                {
                    if (_onDispose != null)
                    {
                        foreach (var action in _onDispose)
                        {
                            action();
                        }
                    }

                    if (_dte != null && _dte.Debugger.CurrentMode != dbgDebugMode.dbgDesignMode)
                    {
                        _dte.Debugger.TerminateAll();
                        _dte.Debugger.Stop();
                    }
                    DismissAllDialogs();
                    for (int i = 0; i < 100 && !_skipCloseAll; i++)
                    {
                        try
                        {
                            _dte.Solution.Close(false);
                            break;
                        }
                        catch
                        {
                            _dte.Documents.CloseAll(EnvDTE.vsSaveChanges.vsSaveChangesNo);
                            System.Threading.Thread.Sleep(200);
                        }
                    }
                }
                catch (Exception ex)
                {
                    Debug.WriteLine("Exception disposing VisualStudioApp: {0}", ex);
                }
            }
        }

3. Example

View license
protected virtual void Dispose(bool disposing) {
            if (!_isDisposed) {
                _isDisposed = true;
                try {
                    if (_onDispose != null) {
                        foreach (var action in _onDispose) {
                            action();
                        }
                    }

                    if (_dte != null && _dte.Debugger.CurrentMode != dbgDebugMode.dbgDesignMode) {
                        _dte.Debugger.TerminateAll();
                        _dte.Debugger.Stop();
                    }
                    DismissAllDialogs();
                    for (int i = 0; i < 100 && !_skipCloseAll; i++) {
                        try {
                            _dte.Solution.Close(false);
                            break;
                        } catch {
                            _dte.Documents.CloseAll(EnvDTE.vsSaveChanges.vsSaveChangesNo);
                            System.Threading.Thread.Sleep(200);
                        }
                    }
                } catch (Exception ex) {
                    Debug.WriteLine("Exception disposing VisualStudioApp: {0}", ex);
                }

                AssertListener.ThrowUnhandled();
            }
        }