Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 Using the EventHandlingScopeActivit...
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Using the EventHandlingScopeActivity Activity

An EventHandlingScopeActivity activity executes its main child activity concurrently with an EventHandlersActivity activity. Each EventDrivenActivity in the EventHandlersActivity activity might execute many times, or not at all.

The following example shows this concept using XML.

<EventHandlingScopeActivity>
   <SequenceActivity>
      <DoSomething />
      <DoSomethingElse />
   </SequenceActivity>
   <EventHandlersActivity>
      <EventDrivenActivity1>
         <!--Receive Cancel Message-->
      </EventDrivenActivity1>
      <EventDrivenActivity2>
         <!--Timer-->
      </EventDrivenActivity2>
   </EventHandlersActivity>
</EventHandlingScopeActivity>

In the example, the EventHandlingScopeActivity activity executes the SequenceActivity activity, which is its main child activity. At the same time, each EventDrivenActivity may or may not execute depending on whether their events, in this case a cancel message or timer expiration, occur while the SequenceActivity activity is executing.

See Also



Copyright © 2007 by Microsoft Corporation. All rights reserved.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker