IdeaBlade DevForce 2010 Help Reference
IEntityManagerAsync Interface
Members  See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace : IEntityManagerAsync Interface



Interface implemented explicitly by the EntityManager to support the System.IAsyncResult asynchronous design pattern.

Syntax

Visual Basic (Declaration) 
<ObsoleteAttribute("Will be removed after 9/1/2012.")>
Public Interface IEntityManagerAsync 
Visual Basic (Usage)Copy Code
Dim instance As IEntityManagerAsync
C# 
[ObsoleteAttribute("Will be removed after 9/1/2012.")]
public interface IEntityManagerAsync 
C++/CLI 
[ObsoleteAttribute("Will be removed after 9/1/2012.")]
public interface class IEntityManagerAsync 

Remarks

The EntityManager supports a hybrid of the event-based asynchronous pattern as part of its standard API. You'll recognize these methods by the OperationNameAsync naming convention. For those needing additional control over their asynchronous operations the EntityManager also supports the IAsyncResult pattern through the IEntityManagerAsync interface.

In the IAsyncResult pattern an asynchronous operation is implemented as two methods named BeginOperationName and EndOperationName to begin and end the asynchronous operation "OperationName". After calling BeginOperationName, an application can continue executing instructions on the calling thread while the asynchronous operation takes place on a different thread. For each call to BeginOperationName, the application should also call EndOperationName to get the results of the operation.

The BeginOperationName method begins the asynchronous operation and returns an object that implements the System.IAsyncResult interface. These operations accept the parameters declared in the synchronous version of the method, as well as an System.AsyncCallback delegate and a user-defined object. Either or both of these additional parameters may be null. If specified, the System.AsyncCallback delegate is called when the operation completes.

The EndOperationName method ends the asynchronous operation. The return value of the method is the same type returned by its synchronous counterpart. The System.IAsyncResult returned by the Begin operation must be passed as a parameter to the corresponding End operation. If the asynchronous operation has not completed when EndOperationName is called, the method blocks the calling thread until the asynchronous operation is complete. Exceptions thrown by the asynchronous operation are thrown when EndOperationName is called.

Note: In Silverlight applications, the EndOperationName methods should only be called within the System.AsyncCallback method, otherwise you will hang the UI thread.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.