CommonMessagePump Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
CommonMessagePump allows callers to block the current thread until a handle or handles have been signaled. During the wait the IDE will be placed in a modal state to prevent reentrancy. If the wait takes more than 2 secs a wait dialog is presented to the user which can be canceled (by default). Callers can call the default behaviour which will show default text in the wait dialog or they can provide custom values for things like the dialog text, status bar text, timeout values etc. Callers can also provide a custom implementation of IVsCommonMessagePumpClientEvents which allows the client to run code when certain events occur such as messages being processed, timeout or a handle being signaled. This interface can also be used to detemine if the wait should continue or return.
public ref class CommonMessagePump : Microsoft::Internal::VisualStudio::Shell::Interop::IOleComponent2Private, Microsoft::VisualStudio::OLE::Interop::IOleComponent, Microsoft::VisualStudio::Shell::Interop::IVsCommonMessagePump
[Windows::Foundation::Metadata::WebHostHidden]
class CommonMessagePump : Microsoft::Internal::VisualStudio::Shell::Interop::IOleComponent2Private, Microsoft::VisualStudio::OLE::Interop::IOleComponent, Microsoft::VisualStudio::Shell::Interop::IVsCommonMessagePump
public class CommonMessagePump : Microsoft.Internal.VisualStudio.Shell.Interop.IOleComponent2Private, Microsoft.VisualStudio.OLE.Interop.IOleComponent, Microsoft.VisualStudio.Shell.Interop.IVsCommonMessagePump
type CommonMessagePump = class
interface IVsCommonMessagePump
interface IOleComponent2Private
interface IOleComponent
Public Class CommonMessagePump
Implements IOleComponent, IOleComponent2Private, IVsCommonMessagePump
- Inheritance
-
CommonMessagePump
- Implements
-
Microsoft.Internal.VisualStudio.Shell.Interop.IOleComponent2Private IOleComponent IVsCommonMessagePump
Remarks
During the wait, the IDE is placed in a modal state to prevent reentrancy. If the wait takes more than 2 seconds, a wait dialog is presented to the user which can be canceled (by default). Callers can use the default behavior, which will show default text in the wait dialog, or they can provide custom values for things like the dialog text, status bar text, timeout values, and so on.
Callers can also provide a custom implementation of IVsCommonMessagePumpClientEvents, which allows the client to run code when certain events occur such as messages being processed, a timeout, or a handle being signaled. This interface can also be used to determine if the wait should continue or return.
Constructors
CommonMessagePump() |
Initializes a new instance of CommonMessagePump. |
Properties
AllowCancel |
Controls if the wait dialog has an enabled cancel button. |
CurrentStep |
Current step for the progress control of the wait dialog. |
EnableRealProgress |
Determines what type of progress control to use in the Wait Dialog. true indicates a percentage progress. false indicates a marquee stype progress. Only has an effect before calling the ModalWait functions. |
ProgressText |
Gets the progress text. |
StatusBarText |
Text of the status bar during the wait. |
Timeout |
Set the timeout value for the modal wait. Use TimeSpan.MaxValue for an infinite wait. |
TotalSteps |
Total number of steps for the progress control of the wait dialog. |
WaitText |
Wait dialog text for what we are waiting on. |
WaitTitle |
Title of the wait dialog |
Methods
ModalWaitForHandles(WaitHandle) |
Blocks the current thread by pumping messages until either a timeout or the specified handle has been signaled. |
ModalWaitForHandles(WaitHandle[], Int32) |
Blocks the current thread by pumping messages until either a timeout or one of the specified handles has been signaled. |
ModalWaitForHandles(WaitHandle[], IVsCommonMessagePumpClientEvents) |
Blocks the current thread by pumping messages until either a timeout or one of the specified handles has been signaled. |