Export (0) Print
Expand All

WorkflowRuntimeService.OnStarted Method

When overridden in a derived class, represents the method that will be called when the workflow runtime engine raises the WorkflowRuntime.Started event.

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

protected virtual void OnStarted()

The WorkflowRuntimeService class implements a two-phase starting mechanism so that workflow runtime engine services may perform any initialization that depends on other services after the workflow runtime engine has invoked the Start method for all of its workflow runtime engine services. After the workflow runtime engine has called the Start method of all of its workflow runtime engine services, it raises the WorkflowRuntime.Started event. You can override the OnStarted method to provide any final startup functionality required by your service when the WorkflowRuntime.Started event is raised. The mechanics of subscribing and unsubscribing from the WorkflowRuntime.Started event is handled internally.

NoteNote:

If your service is added to the workflow runtime engine by a call to AddService after the workflow runtime engine has already been started, the workflow runtime engine will call Start on your service. However, in this situation, the Started event has already occurred, therefore, your service may have to perform any initialization that it would ordinarily perform in OnStarted from inside the Start method. You can test IsStarted to determine whether the workflow runtime engine has been started.

State is set to Started before OnStarted is invoked. The default implementation of OnStarted performs no action.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2015 Microsoft