Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ListenActivity Class
Collapse the table of content
Expand the table of content

ListenActivity Class

Makes the workflow wait for any one of several possible events before the activity proceeds. This class cannot be inherited.

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

<ToolboxBitmapAttribute(GetType(ListenActivity), "Resources.Listen.png")> _
Public NotInheritable Class ListenActivity _
	Inherits CompositeActivity _
	Implements IActivityEventListener(Of ActivityExecutionStatusChangedEventArgs)
Dim instance As ListenActivity

The ListenActivity is a CompositeActivity, which means the ListenActivity can contain other activities. The ListenActivity can only contain EventDrivenActivity activities and must have a minimum of two child activities.

The ListenActivity can contain many branches and each branch is waiting for a particular event to occur before running. Each branch is event driven and the event that occurs runs the corresponding branch first. All other branches cancel and stop listening for events.

The ListenActivity cannot be used in state machine workflows.

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

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

© 2015 Microsoft