Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Creating the WorkflowRuntime
Collapse the table of content
Expand the table of content

Creating the WorkflowRuntime

.NET Framework 3.5

The default mechanism for initializing Windows Workflow Foundation is to use the WorkflowRuntime class, as follows:

using System;
using System.Threading;
using System.Workflow.Runtime;
using System.Workflow.Runtime.Hosting;

class Program
    static void Main(string[] args)
        using (WorkflowRuntime workflowRuntime = new WorkflowRuntime())

In the using statement body, a WorkflowRuntime object is initialized and ready for use. At this point, you can create event handlers to handle events that are raised by the runtime engine, retrieve and configure any of the base services used by the runtime engine, and finally create and start a workflow instance. For more information about Windows Workflow Foundation services, see Windows Workflow Foundation Services.

See Also

© 2015 Microsoft