Package.IServiceContainer.RemoveService 方法 (Type, Boolean)
此 API 支持 .NET Framework 基础结构,不适合在代码中直接使用。
从服务容器移除特定服务类型和选择性地提升服务的删除父服务容器。
命名空间: Microsoft.VisualStudio.Shell
程序集: Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)
语法
声明
Private Sub RemoveService ( _
serviceType As Type, _
promote As Boolean _
) Implements IServiceContainer.RemoveService
void IServiceContainer.RemoveService(
Type serviceType,
bool promote
)
参数
- serviceType
类型:System.Type
要移除的服务类型。
- promote
类型:System.Boolean
true ,则将此请求提升到任何父服务容器;否则为 false。
实现
IServiceContainer.RemoveService(Type, Boolean)
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。