Export (0) Print
Expand All

WorkflowRuntime Constructor (WorkflowRuntimeSection)

Initializes a new instance of the WorkflowRuntime class by using the settings in the specified WorkflowRuntimeSection.

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

public WorkflowRuntime(
	WorkflowRuntimeSection settings
)

ExceptionCondition
ArgumentNullException

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

InvalidOperationException

A WorkflowRuntime already exists for this application domain.

This constructor provides a mechanism to configure the workflow run-time engine using a single method call for hosts that do not use an application configuration file. There are many reasons for not using the application configuration file. A host can run in an environment that does not allow using configuration files; for example, in trusted environments that do not allow reading from the application configuration file for security reasons. Also, a host can use a proprietary configuration mechanism; for example, the host can store the workflow run-time engine configuration settings in a SQL database.

The workflow run-time engine loads and instantiates classes of the types contained in WorkflowRuntimeSection.Services. When the workflow run-time engine constructs these classes it looks for class constructors with the following signatures in the following order:

  1. Service(WorkflowRuntime runtime, NameValueCollection parameters)

  2. Service(WorkflowRuntime runtime)

  3. Service(NameValueCollection parameters)

  4. Service()

All service classes that are specified in settings must implement at least one of these constructor signatures.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft