TrackingWorkflowSuspendedEventArgs 類別

定義

警告:已過時

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

包含工作流程執行個體暫止原因的相關資訊。Contains information about the reason that a workflow instance was suspended.

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

範例

下列程式碼範例將示範一個名稱為 WriteSuspendedEventArgs 的方法,該方法會擷取 TrackingWorkflowSuspendedEventArgsThe following code example demonstrates a method, named WriteSuspendedEventArgs, which captures a TrackingWorkflowSuspendedEventArgs. 程式碼將來自方法引數的資訊寫入主控台中,包括 Error 屬性的值。The code writes information from the method's arguments to the console, including the value of the Error property.

這個程式碼範例是 Program.cs 檔案中<EventArgs 追蹤 SDK>範例的一部分。This code example is part of the EventArgs Tracking SDK Sample from the Program.cs file. 如需詳細資訊,請參閱EventArgs 追蹤範例For more information, see EventArgs Tracking Sample.

static void WriteSuspendedEventArgs(string eventDescription, TrackingWorkflowSuspendedEventArgs suspendedEventArgs, DateTime eventDataTime)
{
    Console.WriteLine("\nSuspended Event Arguments Read From Tracking Database:\n");
    Console.WriteLine("EventDataTime: " + eventDataTime.ToString());
    Console.WriteLine("EventDescription: " + eventDescription);
    Console.WriteLine("SuspendedEventArgs Info: " + suspendedEventArgs.Error);
}
Shared Sub WriteSuspendedEventArgs(ByVal eventDescription As String, ByVal suspendedEventArgs As TrackingWorkflowSuspendedEventArgs, ByVal eventDataTime As DateTime)
    Console.WriteLine(vbCrLf + "Suspended Event Arguments Read From Tracking Database:")
    Console.WriteLine("EventDataTime: " + eventDataTime.ToString(CultureInfo.CurrentCulture))
    Console.WriteLine("EventDescription: " + eventDescription)
    Console.WriteLine("SuspendedEventArgs Info: " + suspendedEventArgs.Error)
End Sub

備註

注意

此資料討論已被汰換的類型及命名空間。This material discusses types and namespaces that are obsolete. 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

TrackingWorkflowSuspendedEventArgs 在工作流程執行個體暫止時由執行階段追蹤基礎結構產生。A TrackingWorkflowSuspendedEventArgs is generated by the runtime tracking infrastructure when a workflow instance is suspended. 如果與工作流程執行個體關聯的 TrackingProfile 包括設定用於 WorkflowTrackPointTrackingWorkflowEvent,則工作流程追蹤基礎結構會將 TrackingWorkflowSuspendedEventArgs 中的 EventArgs 放入它傳送至追蹤服務的 WorkflowTrackingRecord 中。If the TrackingProfile associated with a workflow instance includes a WorkflowTrackPoint configured for a TrackingWorkflowEvent, then the workflow tracking infrastructure puts a TrackingWorkflowSuspendedEventArgs in EventArgs in the WorkflowTrackingRecord that it sends to the Tracking service.

注意

只有執行階段追蹤服務會使用 TrackingWorkflowSuspendedEventArgs,在 WorkflowTrackingRecord 中傳遞資訊。TrackingWorkflowSuspendedEventArgs is used only by the runtime tracking service to pass information in a WorkflowTrackingRecord. WorkflowRuntime.WorkflowSuspended 事件的資料則是在 WorkflowSuspendedEventArgs 中傳遞。The data for a WorkflowRuntime.WorkflowSuspended event is passed in a WorkflowSuspendedEventArgs.

屬性

Error

包含工作流程執行個體暫止原因的相關資訊。Contains information about the reason that a workflow instance was suspended. 這可能來自 Suspend(String) (字串錯誤),或您在 Error 活動上設定的 SuspendActivity 屬性。This can come from the Suspend(String) (string error) or the Error property that you set on the SuspendActivity activity.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於

另請參閱