Share via


DataServiceContext.EndExecute Method

Definition

Overloads

EndExecute(IAsyncResult)

Called to complete the BeginExecute<TElement>(Uri, AsyncCallback, Object).

EndExecute<TElement>(IAsyncResult)

Called to complete the BeginExecute<TElement>(Uri, AsyncCallback, Object).

EndExecute(IAsyncResult)

public virtual Microsoft.OData.Client.OperationResponse EndExecute (IAsyncResult asyncResult);
abstract member EndExecute : IAsyncResult -> Microsoft.OData.Client.OperationResponse
override this.EndExecute : IAsyncResult -> Microsoft.OData.Client.OperationResponse
Public Overridable Function EndExecute (asyncResult As IAsyncResult) As OperationResponse

Parameters

asyncResult
IAsyncResult

An IAsyncResult that represents the status of the asynchronous operation.

Returns

The result of the operation.

Remarks

This method should be used in combination with the BeginExecute overload which expects the request uri to end with a service operation or service action that returns void.

Applies to

EndExecute<TElement>(IAsyncResult)

public virtual System.Collections.Generic.IEnumerable<TElement> EndExecute<TElement> (IAsyncResult asyncResult);
abstract member EndExecute : IAsyncResult -> seq<'Element>
override this.EndExecute : IAsyncResult -> seq<'Element>
Public Overridable Function EndExecute(Of TElement) (asyncResult As IAsyncResult) As IEnumerable(Of TElement)

Type Parameters

TElement

The type returned by the query.

Parameters

asyncResult
IAsyncResult

IAsyncResult object.

Returns

IEnumerable<TElement>

The results returned by the query operation.

Exceptions

When asyncResult is null.

When asyncResult did not originate from this DataServiceContext instance. -or- When the EndExecute<TElement>(IAsyncResult) method was previously called.

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

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

Applies to