ServiceProvider.RemoveService Method (Type, Boolean)

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 _
)
'使用
Dim instance As ServiceProvider
Dim serviceType As Type
Dim promote As Boolean

instance.RemoveService(serviceType, promote)
public virtual void RemoveService(
    Type serviceType,
    bool promote
)
public:
virtual void RemoveService(
    Type^ serviceType, 
    bool promote
)
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)

Permissions

See Also

Reference

ServiceProvider Class

ServiceProvider Members

RemoveService Overload

Microsoft.VisualStudio.Data.Framework Namespace