private VsWaitLoop(string text) { int hr; var messagePumpFactory = (IVsCommonMessagePumpFactory)Package.GetGlobalService(typeof(SVsCommonMessagePumpFactory)); if (messagePumpFactory == null) { return; // normal case in glass } IVsCommonMessagePump messagePump; hr = messagePumpFactory.CreateInstance(out messagePump); if (hr != 0) return; hr = messagePump.SetAllowCancel(true); if (hr != 0) return; hr = messagePump.SetWaitText(text); if (hr != 0) return; hr = messagePump.SetStatusBarText(string.Empty); if (hr != 0) return; _messagePump = messagePump; }
private VsWaitLoop(string text) { int hr; var messagePumpFactory = (IVsCommonMessagePumpFactory)Package.GetGlobalService(typeof(SVsCommonMessagePumpFactory)); if (messagePumpFactory == null) { return; // normal case in glass } IVsCommonMessagePump messagePump; hr = messagePumpFactory.CreateInstance(out messagePump); if (hr != 0) { return; } hr = messagePump.SetAllowCancel(true); if (hr != 0) { return; } hr = messagePump.SetWaitText(text); if (hr != 0) { return; } hr = messagePump.SetStatusBarText(string.Empty); if (hr != 0) { return; } _messagePump = messagePump; }