Export (0) Print
Expand All

DelayActivity.TimeoutDuration Property

Gets and sets the duration of the delay in the workflow.

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

public TimeSpan TimeoutDuration { get; set; }

Property Value

Type: System.TimeSpan
A TimeSpan that indicates the length of the delay in the workflow.

The time period set in this property determines the time the workflow will sit idle before the workflow proceeds to the next activity.

The following code example demonstrates how to set the value of the TimeoutDuration property to 3 seconds. This code assumes that delay2 is of type DelayActivity. This code example is part of the SimpleStateMachineWorkflow SDK Sample from the StateMachineWorkflow.cs file. For more information, see Simple State Machine.

this.state1Delay.Name = "state1Delay";
this.state1Delay.TimeoutDuration = System.TimeSpan.Parse("00:00:02");

.NET Framework

Supported in: 4.5.2, 4.5.1, 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