DataServiceContext.BeginExecuteBatch 方法

定义

以异步方式将一组查询作为批处理提交到数据服务。

public:
 IAsyncResult ^ BeginExecuteBatch(AsyncCallback ^ callback, System::Object ^ state, ... cli::array <System::Data::Services::Client::DataServiceRequest ^> ^ queries);
public IAsyncResult BeginExecuteBatch(AsyncCallback callback, object state, params System.Data.Services.Client.DataServiceRequest[] queries);
member this.BeginExecuteBatch : AsyncCallback * obj * System.Data.Services.Client.DataServiceRequest[] -> IAsyncResult
Public Function BeginExecuteBatch (callback As AsyncCallback, state As Object, ParamArray queries As DataServiceRequest()) As IAsyncResult

参数

callback
AsyncCallback

收到对批处理请求的响应时调用的委托。

state
Object

用于将上下文数据传递给回调方法的用户定义状态对象。

queries
DataServiceRequest[]

要包含在批处理请求中的查询请求的数组。

返回

IAsyncResult用于跟踪异步操作状态的对象。

注解

返回 IAsyncResult 的对象用于确定异步操作何时完成。 有关详细信息,请参阅 异步操作

查询指定为 DataServiceRequest<TElement> 实例。 返回一个 DataServiceResponse 代表整个批处理请求的响应。 单个查询响应表示为 DataServiceResponse 可以通过枚举 DataServiceResponse 实例访问的对象。

此方法返回时,已从网络流读取批处理请求的所有 HTTP 响应,但尚未处理响应。 在枚举指定实体之前,响应中不会发生标识解析或对象具体化。

适用于