Upraviť

Zdieľať cez


TrackingWorkflowSuspendedEventArgs Class

Definition

Caution

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
Inheritance
TrackingWorkflowSuspendedEventArgs
Attributes

Examples

The following code example demonstrates a method, named WriteSuspendedEventArgs, which captures a TrackingWorkflowSuspendedEventArgs. The code writes information from the method's arguments to the console, including the value of the Error property.

This code example is part of the EventArgs Tracking SDK Sample from the Program.cs file. 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

Remarks

Note

This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

A TrackingWorkflowSuspendedEventArgs is generated by the runtime tracking infrastructure when a workflow instance is suspended. 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.

Note

TrackingWorkflowSuspendedEventArgs is used only by the runtime tracking service to pass information in a WorkflowTrackingRecord. The data for a WorkflowRuntime.WorkflowSuspended event is passed in a WorkflowSuspendedEventArgs.

Properties

Error

Contains information about the reason that a workflow instance was suspended. This can come from the Suspend(String) (string error) or the Error property that you set on the SuspendActivity activity.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also