ExternalDataEventArgs Class (System.Workflow.Activities)

Switch View :
ScriptFree
.NET Framework Class Library
ExternalDataEventArgs Class

Represents the data sent when an event is raised using the HandleExternalEventActivity activity.

Inheritance Hierarchy

System.Object
  System.EventArgs
    System.Workflow.Activities.ExternalDataEventArgs

Namespace:  System.Workflow.Activities
Assembly:  System.Workflow.Activities (in System.Workflow.Activities.dll)
Syntax

Visual Basic
<SerializableAttribute> _
Public Class ExternalDataEventArgs _
	Inherits EventArgs
C#
[SerializableAttribute]
public class ExternalDataEventArgs : EventArgs
Visual C++
[SerializableAttribute]
public ref class ExternalDataEventArgs : public EventArgs
F#
[<SerializableAttribute>]
type ExternalDataEventArgs =  
    class
        inherit EventArgs
    end

The ExternalDataEventArgs type exposes the following members.

Constructors

  Name Description
Public method ExternalDataEventArgs() Initializes a new instance of the ExternalDataEventArgs class.
Public method ExternalDataEventArgs(Guid) Initializes a new instance of the ExternalDataEventArgs class using the instance identifier of the workflow.
Public method ExternalDataEventArgs(Guid, IPendingWork, Object) Initializes a new instance of the ExternalDataEventArgs class.
Public method ExternalDataEventArgs(Guid, IPendingWork, Object, Boolean) Initializes a new instance of the ExternalDataEventArgs class.
Top
Properties

  Name Description
Public property Identity Gets or sets the identity of the user that raised the event.
Public property InstanceId Gets or sets the workflow instance identifier for the workflow instance that contains the HandleExternalEventActivity that is expected to handle the event.
Public property WaitForIdle Gets or sets a value that indicates whether the event should be raised immediately, or if the workflow should go idle before raising the event.
Public property WorkHandler Gets or sets the IPendingWork to allow the external code, raising the event, to participate in the batch.
Public property WorkItem Gets or sets the object that contains the external code that raises the event.
Top
Methods

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top
Remarks

A local communication interface marked with ExternalDataExchangeAttribute must declare a type that derives from ExternalDataEventArgs in the interface definition for the corresponding event to be handled in a workflow with a HandleExternalEventActivity activity.

Examples

An event class that inherits from ExternalDataEventArgs must implement a constructor that uses the :base(instanceId) constructor. In addition, the new event class must be marked as Serializable as shown in the following code.

C#
[Serializable]
public class TaskEventArgs : ExternalDataEventArgs
{
    private string orderName;

    public TaskEventArgs(Guid instanceId, string id)
        :base(instanceId)
    {
        orderName = id;
    }

    public string Id
    {
        get { return orderName; }
        set { orderName = value; }
    }
}
Version Information

.NET Framework

Supported in: 4, 3.5, 3.0
Platforms

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

Reference