DefaultWorkflowSchedulerService Constructor (NameValueCollection)
Collapse the table of content
Expand the table of content

DefaultWorkflowSchedulerService Constructor (NameValueCollection)

 

Initializes a new instance of the DefaultWorkflowSchedulerService class.

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

public DefaultWorkflowSchedulerService(
	NameValueCollection parameters
)

Parameters

parameters
Type: System.Collections.Specialized.NameValueCollection

A NameValueCollection that holds initialization information.

Exception Condition
ArgumentNullException

parameters contains a null reference (Nothing in Visual Basic).

ArgumentException

One of the key values in the parameters collection contains a null reference (Nothing).

--or--

One of the key values in the parameters collection does not match the default key for DefaultWorkflowSchedulerService.

FormatException

One of the parameters cannot be converted to a double-precision floating point number that matches MaxSimultaneousWorkflows.

ArgumentOutOfRangeException

MaxSimultaneousWorkflows is less than 1.

This constructor is invoked when the workflow runtime engine loads services from an application configuration file. The only valid parameter is maxSimultaneousWorkflows, which can specify the number of workflows that can be run at the same time.

Setting maxSimultaneousWorkflows to a high value might cause the .NET thread pool to starve. This could cause time-outs when a persistence service tries to complete a persistence transaction because Transaction objects also use the .NET thread pool.

If not specified in a constructor or configuration file, the default value for maxSimultaneousWorkflows is 5 for a single-processor machine, and (int)(5 * Environment.ProcessorCount * .8) for a multiple-processor machine. Note that (int)(5 * Environment.ProcessorCount * .8) is not always the same as (int)(4 * Environment.ProcessorCount), because of the rules of integer arithmetic.

.NET Framework
Available since 3.0
Return to top
Show:
© 2016 Microsoft