CommonMessagePump Class
Allows callers to block the current thread until a handle or handles have been signaled.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Shell.CommonMessagePump
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'Declaración
Public Class CommonMessagePump _
Implements IVsCommonMessagePump, IOleComponent2Private, IOleComponent
public class CommonMessagePump : IVsCommonMessagePump,
IOleComponent2Private, IOleComponent
The CommonMessagePump type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CommonMessagePump | Initializes a new instance of CommonMessagePump. |
Top
Properties
Name | Description | |
---|---|---|
AllowCancel | Determines whether the wait dialog has an enabled cancel button. | |
CurrentStep | Gets the current step for the progress control of the wait dialog. | |
EnableRealProgress | Determines the type of progress control to use in the wait dialog. | |
ProgressText | Gets the progress text. | |
StatusBarText | Gets or sets the text of the status bar during the wait. | |
Timeout | Gets or sets the timeout value for the modal wait. | |
TotalSteps | Gets the total number of steps for the progress control of the wait dialog. | |
WaitText | Gets or sets the wait dialog text. | |
WaitTitle | Gets or sets the title of the wait dialog. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ModalWaitForHandles(WaitHandle) | Blocks the current thread by pumping messages until either a timeout or the specified handle has been signaled. | |
ModalWaitForHandles(array<WaitHandle[], IVsCommonMessagePumpClientEvents) | Blocks the current thread by pumping messages until either a timeout or one of the specified handles has been signaled. | |
ModalWaitForHandles(array<WaitHandle[], Int32%) | Blocks the current thread by pumping messages until either a timeout or one of the specified handles has been signaled. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IOleComponent.FContinueMessageLoop | Called during each iteration of a message loop. | |
IOleComponent.FDoIdle | Gives the component a chance to do idle time tasks. | |
IOleComponent.FPreTranslateMessage | Processes the message before it is translated and dispatched. | |
IOleComponent.FQueryTerminate | Called when the component manager wishes to know if the component is in a state in which it can terminate. | |
IOleComponent.FReserved1 | Reserved. | |
IOleComponent.HwndGetWindow | Retrieves a window associated with the component. | |
IOleComponent.OnActivationChange | Notifies the component when a new object is being activated. | |
IOleComponent.OnAppActivate | Notifies the component when the host application gains or loses activation. | |
IOleComponent.OnEnterState | Notifies the component when the application enters or exits the specified state. | |
IOleComponent.OnLoseActivation | Notifies the active component that it has lost its active status because the host or another component has become active. | |
IOleComponent.Terminate | Terminates the message loop. | |
IOleComponent2Private.FContinueMessageLoop | Called during each iteration of a message loop. | |
IOleComponent2Private.FDoIdle | Does idle processing. | |
IOleComponent2Private.FPreTranslateMessage | Handles the message. | |
IOleComponent2Private.FQueryTerminate | Called when the component manager wishes to know whether the component is in a state in which it can terminate. | |
IOleComponent2Private.FReserved1 | Reserved. | |
IOleComponent2Private.GetWaitHandlesAndTimeout | Gets the wait handles and the timeout value. | |
IOleComponent2Private.HwndGetWindow | Gets the associated window. | |
IOleComponent2Private.OnActivationChange | Called when a new object is being activated. | |
IOleComponent2Private.OnAppActivate | Called when an application is being activated or deactivated. | |
IOleComponent2Private.OnEnterState | Called when the environment has entered or left a state. | |
IOleComponent2Private.OnHandleSignaled | Called when a wait handle has been signaled. | |
IOleComponent2Private.OnLoseActivation | Called when the component has lost its active status because the host or another component has become active. | |
IOleComponent2Private.OnTimeout | Called when there is a timeout on a message loop. | |
IOleComponent2Private.Terminate | Terminates the message loop. | |
IVsCommonMessagePump.EnableRealProgress | Determines the kind of progress to be displayed | |
IVsCommonMessagePump.ModalWaitForObjects | Blocks the current thread by pumping messages until either a timeout or one of the specified handles has been signaled. | |
IVsCommonMessagePump.ModalWaitForObjectsWithClient | Blocks the current thread by pumping messages until either a timeout or one of the specified handles has been signaled. | |
IVsCommonMessagePump.SetAllowCancel | Determines whether the wait dialog has an enabled cancel button. | |
IVsCommonMessagePump.SetProgressInfo | Sets progress information for the message. | |
IVsCommonMessagePump.SetStatusBarText | Sets the text of the status bar during the wait. | |
IVsCommonMessagePump.SetTimeout | Sets the timeout value for the modal wait. | |
IVsCommonMessagePump.SetWaitText | Sets the wait dialog text. | |
IVsCommonMessagePump.SetWaitTitle | Sets the title of the wait dialog with the specified title. |
Top
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.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.