ServiceProvider.RemoveService Method

Definition

Overloads

RemoveService(Type)

Removes the specified service from the internal services collection

RemoveService(Type, Boolean)

Removes the specified service from the internal services collection or from the parent service container.

RemoveService(Type)

Removes the specified service from the internal services collection

C++
public:
 virtual void RemoveService(Type ^ serviceType);

Parameters

serviceType
Type

The type of the service.

Implements

Applies to

Visual Studio SDK 2022 and other versions
Product Versions
Visual Studio SDK 2017, 2019, 2022

RemoveService(Type, Boolean)

Removes the specified service from the internal services collection or from the parent service container.

C++
public:
 virtual void RemoveService(Type ^ serviceType, bool promote);

Parameters

serviceType
Type

The type of the service.

promote
Boolean

A Boolean value indicating whether to remove the service from the parent container.

Implements

Applies to

Visual Studio SDK 2022 and other versions
Product Versions
Visual Studio SDK 2017, 2019, 2022