DevForce Help Reference
Coroutine Class
Members 


Provides for serial and parallel execution of multiple asynchronous actions.
Syntax
'Declaration
 
Public MustInherit NotInheritable Class Coroutine 
'Usage
 
Dim instance As Coroutine
public static class Coroutine 
Remarks
Replaces the AsyncSerialTask and AsyncParallelTask classes, which are obsolete and will be removed from the product in early 2011.

Use Start(Func<IEnumerable<INotifyCompleted>>,Action<CoroutineOperation>) to start serial execution of the asynchronous, and synchronous, actions within an "iterator". The iterator is a function which returns an System.Collections.IEnumerable of objects implementing the INotifyCompleted interface. All asynchronous operations within DevForce return a sub-typed BasicOperation, which implements this interface. The Coroutine waits for each operation to complete, either sucessfully or not, and then moves to the next action within the iterator.

Use StartParallel(Func<IEnumerable<INotifyCompleted>>,Action<CoroutineOperation>) to start parallel execution of the asynchronous actions within an iterator. When run in parallel, the Coroutine starts each asynchronous action, and then waits for all actions to complete.

For a detailed discussion of the Coroutine and its flow, see the DevForce Resource Center.

Inheritance Hierarchy

System.Object
   IdeaBlade.EntityModel.Coroutine

Requirements

Target 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

See Also

Reference

Coroutine Members
IdeaBlade.EntityModel Namespace

Send Feedback