WorkflowInstance.GetWorkflowNextTimerExpiration Method ()

 
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.

Returns the next point in time that this WorkflowInstance is scheduled to be delivered a timer message.

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

public DateTime GetWorkflowNextTimerExpiration()

Return Value

Type: System.DateTime

A DateTime value that represents the next ExpiresAt time this WorkflowInstance will be delivered a timer message.

The following example demonstrates using the GetWorkflowNextTimerExpiration method to determine if more workflow timer messages are enqueued. This example is from the WorkflowThreading SDK sample, from the Program.cs file. For more information, see Workflow Threading Sample.

static void ReloadWorkflow(object state)
{
    if (workflowInstance.GetWorkflowNextTimerExpiration() > DateTime.UtcNow)
    {
        SetReloadWorkflowTimer();
    }
    else
    {
        readyHandle.Set();
    }
}

.NET Framework
Available since 3.0
Return to top
Show: