WorkflowRuntime Constructor (WorkflowRuntimeSection)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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
)

Exception Condition
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
Available since 3.0
Return to top
Show: