共用方式為


ActionContext.RemoveService Method

Definition

Removes the specified service type from the service container.

Overloads

RemoveService(Type)

Removes the specified service type from the service container. This class cannot be inherited.

RemoveService(Type, Boolean)

Removes the specified service type from the service container, and optionally promotes the service to parent service containers. This class cannot be inherited.

RemoveService(Type)

Removes the specified service type from the service container. This class cannot be inherited.

public:
 virtual void RemoveService(Type ^ serviceType);
public void RemoveService (Type serviceType);
abstract member RemoveService : Type -> unit
override this.RemoveService : Type -> unit
Public Sub RemoveService (serviceType As Type)

Parameters

serviceType
Type

The type of service to remove.

Implements

Applies to

RemoveService(Type, Boolean)

Removes the specified service type from the service container, and optionally promotes the service to parent service containers. This class cannot be inherited.

public:
 virtual void RemoveService(Type ^ serviceType, bool promote);
public void RemoveService (Type serviceType, bool promote);
abstract member RemoveService : Type * bool -> unit
override this.RemoveService : Type * bool -> unit
Public Sub RemoveService (serviceType As Type, promote As Boolean)

Parameters

serviceType
Type

The type of service to remove.

promote
Boolean

True to promote this request to any parent service containers; otherwise, false.

Implements

Applies to