C# Class GoogleCloudExtension.Utils.ShellUtils

This class contains utilities to manage the UI state of the Visual Studio shell.
Datei anzeigen Open project: GoogleCloudPlatform/google-cloud-visualstudio

Public Methods

Method Description
InvalidateCommandsState ( ) : void

Updates the UI state of all commands in the VS shell. This is useful when the state that determines if a command is enabled/disabled (or visible/invisiable) changes and the commands in the menus need to be updated. In essence this method will cause the OnBeforeQueryStatus method in all commands to be called again.

IsBuilding ( ) : bool

Returns whether the shell is in the buliding state. This will happen if the user is building the app.

IsBusy ( ) : bool

Returns true if the shell is in a busy state.

IsDebugging ( ) : bool

Returns whether the shell is in the debugger state. This will happen if the user is debugging an app.

SetShellUIBusy ( ) : IDisposable

Changes the UI state to a busy state. The pattern to use this method is to assign the result value to a variable in a using statement.

Private Methods

Method Description
GetMonitorSelectionService ( ) : IVsMonitorSelection
GetUIContext ( IVsMonitorSelection monitorSelection, System.Guid contextGuid ) : bool
SetShellNormal ( ) : void
SetUIContext ( IVsMonitorSelection monitorSelection, System.Guid contextGuid, bool value ) : void

Method Details

InvalidateCommandsState() public static method

Updates the UI state of all commands in the VS shell. This is useful when the state that determines if a command is enabled/disabled (or visible/invisiable) changes and the commands in the menus need to be updated. In essence this method will cause the OnBeforeQueryStatus method in all commands to be called again.
public static InvalidateCommandsState ( ) : void
return void

IsBuilding() public static method

Returns whether the shell is in the buliding state. This will happen if the user is building the app.
public static IsBuilding ( ) : bool
return bool

IsBusy() public static method

Returns true if the shell is in a busy state.
public static IsBusy ( ) : bool
return bool

IsDebugging() public static method

Returns whether the shell is in the debugger state. This will happen if the user is debugging an app.
public static IsDebugging ( ) : bool
return bool

SetShellUIBusy() public static method

Changes the UI state to a busy state. The pattern to use this method is to assign the result value to a variable in a using statement.
public static SetShellUIBusy ( ) : IDisposable
return IDisposable