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.TypeThe type of the service.
promote
Type: System.BooleanA Boolean value indicating whether to remove the service from the parent container.
Implements
IServiceContainer.RemoveService(Type, Boolean)
Permissions
- 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.