WorkflowInstance.GetWorkflowNextTimerExpiration Method

Definition

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

C#
public DateTime GetWorkflowNextTimerExpiration();

Returns

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

Examples

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.

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

Applies to

Producto Versiones
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also