共用方式為


WorkflowCompletedEventArgs.OutputParameters 屬性

定義

從工作流程取得輸出。

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)

屬性值

以參數名稱做為索引鍵的值 Dictionary<TKey,TValue>,其中包含工作流程的輸出參數。

範例

下列程式碼範例將示範如何從儲存在 OutputParameters 屬性中的索引鍵中取得值。 OnWorkflowCompleted 方法有採用 WorkflowCompletedEventArgs 的參數。 引發 WorkflowCompleted 事件時,會呼叫此方法。 程式碼使用 OutputParameters 屬性取得與 Status 索引鍵關聯的值,並將它寫入主控台中。

這個程式碼範例是 Program.cs 檔案中<循序工作流程與參數 SDK>範例的一部分。 如需詳細資訊,請參閱 使用參數範例的工作流程

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

備註

OutputParameters 包含工作流程的 outref 參數。

適用於

另請參閱