Edit

Share via


WorkflowCompletedEventArgs.OutputParameters Property

Definition

Gets the output from the workflow.

public:
 property System::Collections::Generic::Dictionary<System::String ^, System::Object ^> ^ OutputParameters { System::Collections::Generic::Dictionary<System::String ^, System::Object ^> ^ get(); };
public System.Collections.Generic.Dictionary<string,object> OutputParameters { get; }
member this.OutputParameters : System.Collections.Generic.Dictionary<string, obj>
Public ReadOnly Property OutputParameters As Dictionary(Of String, Object)

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.

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();
}
Shared Sub OnWorkflowCompleted(ByVal sender As Object, ByVal e As WorkflowCompletedEventArgs)

    'The order status is stored in the "status" "out" parameter
    Dim orderStatus As String = e.OutputParameters("Status").ToString()
    Console.WriteLine("Order was " + orderStatus)
    waitHandle.Set()
End Sub

Remarks

OutputParameters contains the out and ref parameters of the workflow.

Applies to

See also