Edit

Share via


WorkflowRuntime.RemoveService(Object) Method

Definition

Removes the specified service from the workflow run-time engine.

public:
 void RemoveService(System::Object ^ service);
public void RemoveService(object service);
member this.RemoveService : obj -> unit
Public Sub RemoveService (service As Object)

Parameters

service
Object

An object that represents the service to remove.

Exceptions

service is a null reference (Nothing in Visual Basic).

The WorkflowRuntime is already disposed of.

The workflow run-time engine has started (IsStarted is true) and service is a core service.

-or-

service is not registered with the workflow run-time engine.

Remarks

You cannot remove a core service while the workflow run-time engine is running (IsStarted is true). Core services are services that derive from the WorkflowSchedulerService class, the WorkflowCommitWorkBatchService class, the WorkflowPersistenceService class, or the TrackingService class. If service derives from the WorkflowRuntimeService class, RemoveService calls the Stop method implemented by service.

Applies to