Visual Basic (Declaration) | |
---|---|
<ObsoleteAttribute("Will be removed after 9/1/2012.")> Public Interface IEntityManagerAsync |
Visual Basic (Usage) | ![]() |
---|---|
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 |
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.
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