Export (0) Print
Expand All

DataServiceContext::EndExecute<TElement> Method (IAsyncResult)

Called to complete the BeginExecute.

Namespace:  System.Data.Services.Client
Assembly:  Microsoft.Data.Services.Client (in Microsoft.Data.Services.Client.dll)

public:
generic<typename TElement>
IEnumerable<TElement>^ EndExecute(
	IAsyncResult^ asyncResult
)

Type Parameters

TElement

The type returned by the query.

Parameters

asyncResult
Type: System::IAsyncResult
IAsyncResult object.

Return Value

Type: System.Collections.Generic::IEnumerable<TElement>
The results returned by the query operation.

ExceptionCondition
ArgumentNullException

When asyncResult is nullptr.

ArgumentException

When asyncResult did not originate from this DataServiceContext instance.

-or-

When the EndExecute method was previously called.

InvalidOperationException

When an error is raised either during execution of the request or when it converts the contents of the response message into objects.

DataServiceQueryException

When the data service returns an HTTP 404: Resource Not Found error.

According to the standard begin-end asynchronous pattern, the provided callback is invoked when query results are retrieved. For more information, see Asynchronous Operations (WCF Data Services).

When the callback is invoked, all results have been read from the HTTP stream, but they have not been processed; no local user-facing objects have been materialized or modified and identity resolution has not occurred. When EndExecute is invoked, a DataServiceResponse is created and returned but the results still have not been processed. Identity resolution, object materialization, and manipulation occur only when the user enumerates the results.

Show:
© 2014 Microsoft