Package.IServiceContainer.RemoveService Method (Type, Boolean)
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Removes the given service type from the service container, and optionally promotes the removal of the service to parent service containers.
Namespace: Microsoft.VisualStudio.Shell
Assemblies: Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)
Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Syntax
'Declaration
Private Sub RemoveService ( _
serviceType As Type, _
promote As Boolean _
) Implements IServiceContainer.RemoveService
'Usage
Dim instance As Package
Dim serviceType As Type
Dim promote As Boolean
CType(instance, IServiceContainer).RemoveService(serviceType, _
promote)
void IServiceContainer.RemoveService(
Type serviceType,
bool promote
)
private:
virtual void RemoveService(
Type^ serviceType,
bool promote
) sealed = IServiceContainer::RemoveService
private abstract RemoveService :
serviceType:Type *
promote:bool -> unit
private override RemoveService :
serviceType:Type *
promote:bool -> unit
JScript does not support explicit interface implementations.
Parameters
- serviceType
Type: System.Type
The type of service to remove.
- promote
Type: System.Boolean
true to promote this request to any parent service containers; otherwise, false.
Implements
IServiceContainer.RemoveService(Type, Boolean)
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.