WorkflowRuntime::StopRuntime Method ()

 

Stops the workflow run-time engine and the run-time services.

Namespace:   System.Workflow.Runtime
Assembly:  System.Workflow.Runtime (in System.Workflow.Runtime.dll)

public:
void StopRuntime()

Exception Condition
ObjectDisposedException

The WorkflowRuntime is already disposed of.

This method causes the workflow run-time engine to unload each of its workflow instances, stop all of its services that are derived from the WorkflowRuntimeService class, set IsStarted to false, and raise the Stopped event.

To shut down the WorkflowRuntime gracefully, call StopRuntime before you call Dispose.

For more information, see the Dispose method.

The following code example demonstrates how to use WorkflowRuntime functionality from a workflow host. StopRuntime is called after the host has completed all other processing associated with the runtime.

This code example is part of the Canceling a Workflow sample.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: