public void Dispose()
{
if (!this.QuitVisualStudioOnDispose)
{
return;
}
AutoResetEvent autoResetEvent = new AutoResetEvent(false);
this.solutionEventsListener.AfterSolutionClosed += () => { autoResetEvent.Set(); };
this.dteInternal.Quit();
autoResetEvent.WaitOne();
}
}