WorkflowCompletedEventArgs 類別

定義

警告

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

提供 WorkflowCompleted 事件的資料。

public ref class WorkflowCompletedEventArgs : System::Workflow::Runtime::WorkflowEventArgs
public class WorkflowCompletedEventArgs : System.Workflow.Runtime.WorkflowEventArgs
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public class WorkflowCompletedEventArgs : System.Workflow.Runtime.WorkflowEventArgs
type WorkflowCompletedEventArgs = class
    inherit WorkflowEventArgs
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type WorkflowCompletedEventArgs = class
    inherit WorkflowEventArgs
Public Class WorkflowCompletedEventArgs
Inherits WorkflowEventArgs
繼承
WorkflowCompletedEventArgs
屬性

範例

下列程式碼範例示範採用 WorkflowCompletedEventArgs 做為參數的事件處理常式方法。 引發 OnWorkflowCompleted 事件時,會呼叫 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

備註

注意

此資料討論已被汰換的類型及命名空間。 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型

工作流程完成時,工作流程執行階段引擎會引發 WorkflowCompleted 事件。 工作流程執行階段引擎在 WorkflowCompletedEventArgs 中傳遞工作流程的所有輸出參數。 其中包括工作流程的 outref 參數。

屬性

OutputParameters
已淘汰.

從工作流程取得輸出。

WorkflowDefinition
已淘汰.

取得 Activity,代表完成工作流程執行個體時的工作流程定義。

WorkflowInstance
已淘汰.

取得與工作流程事件關聯的工作流程執行個體。

(繼承來源 WorkflowEventArgs)

方法

Equals(Object)
已淘汰.

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()
已淘汰.

做為預設雜湊函式。

(繼承來源 Object)
GetType()
已淘汰.

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()
已淘汰.

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()
已淘汰.

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱