Removes the specified service from the internal services collection or from the parent service container.
Namespace:  Microsoft.VisualStudio.Data.Framework
Assembly:  Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
声明
Public Overridable Sub RemoveService ( _
    serviceType As Type, _
    promote As Boolean _
)
public virtual void RemoveService(
    Type serviceType,
    bool promote
)
public:
virtual void RemoveService(
    Type^ serviceType, 
    bool promote
)
abstract RemoveService : 
        serviceType:Type * 
        promote:bool -> unit 
override RemoveService : 
        serviceType:Type * 
        promote:bool -> unit 
public function RemoveService(
    serviceType : Type, 
    promote : boolean
)
Parameters
- serviceType
Type: System.Type
The type of the service. 
- promote
Type: System.Boolean
A Boolean value indicating whether to remove the service from the parent container. 
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.