VsShellUtilities.IsInAutomationFunction(IServiceProvider) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
确定扩展性对象当前是否正在执行自动化操作。
public:
static bool IsInAutomationFunction(IServiceProvider ^ serviceProvider);
public static bool IsInAutomationFunction (IServiceProvider serviceProvider);
static member IsInAutomationFunction : IServiceProvider -> bool
Public Shared Function IsInAutomationFunction (serviceProvider As IServiceProvider) As Boolean
Public Function IsInAutomationFunction (serviceProvider As IServiceProvider) As Boolean
参数
- serviceProvider
- IServiceProvider
服务提供程序。
返回
如果所在对象正在执行自动化函数,则为 true。
注解
通常调用此方法来确定是否显示消息框或其他模型窗口。 由于这些窗口需要用户的响应,因此应在自动化操作期间抑制它们。