CommonMessagePump Class
Allows callers to block the current thread until a handle or handles have been signaled.
Inheritance Hierarchy
Object
Microsoft.VisualStudio.Shell.CommonMessagePump
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
Public Class CommonMessagePump _
Implements IVsCommonMessagePump, IOleComponent
public class CommonMessagePump : IVsCommonMessagePump,
IOleComponent
public ref class CommonMessagePump : IVsCommonMessagePump,
IOleComponent
type CommonMessagePump =
class
interface IVsCommonMessagePump
interface IOleComponent
end
public class CommonMessagePump implements IVsCommonMessagePump, 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 the default hash function. (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. | |
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.