Прочетете на английски Редактиране

Споделяне чрез


WorkflowCompletedEventArgs.OutputParameters Property

Definition

Gets the output from the workflow.

C#
public System.Collections.Generic.Dictionary<string,object> OutputParameters { get; }

Property Value

A Dictionary<TKey,TValue> of values keyed by parameter name that contains the output parameters of the workflow.

Examples

The following code example demonstrates how to obtain a value from a key stored in the OutputParameters property. The OnWorkflowCompleted method has a parameter that takes a WorkflowCompletedEventArgs. This method is called when the WorkflowCompleted event is raised. The code uses the OutputParameters property to obtain the value associated with the Status key and writes it to the console.

This code example is part of the Sequential Workflow with Parameters SDK Sample from the Program.cs file. For more information, see Workflow with Parameters Sample.

C#
static void OnWorkflowCompleted(object sender, WorkflowCompletedEventArgs e)
{
    //The order status is stored in the "status" "out" parameter
    string orderStatus = e.OutputParameters["Status"].ToString();
    Console.WriteLine("Order was " + orderStatus);
    waitHandle.Set();
}

Remarks

OutputParameters contains the out and ref parameters of the workflow.

Applies to

Продукт Версии
.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