DataServiceContext.BeginExecuteBatch 方法
将一组查询以批处理方式异步提交到数据服务。
命名空间: System.Data.Services.Client
程序集: Microsoft.Data.Services.Client(在 Microsoft.Data.Services.Client.dll 中)
语法
声明
Public Function BeginExecuteBatch ( _
callback As AsyncCallback, _
state As Object, _
ParamArray queries As DataServiceRequest() _
) As IAsyncResult
用法
Dim instance As DataServiceContext
Dim callback As AsyncCallback
Dim state As Object
Dim queries As DataServiceRequest()
Dim returnValue As IAsyncResult
returnValue = instance.BeginExecuteBatch(callback, _
state, queries)
public IAsyncResult BeginExecuteBatch(
AsyncCallback callback,
Object state,
params DataServiceRequest[] queries
)
public:
IAsyncResult^ BeginExecuteBatch(
AsyncCallback^ callback,
Object^ state,
... array<DataServiceRequest^>^ queries
)
member BeginExecuteBatch :
callback:AsyncCallback *
state:Object *
queries:DataServiceRequest[] -> IAsyncResult
public function BeginExecuteBatch(
callback : AsyncCallback,
state : Object,
... queries : DataServiceRequest[]
) : IAsyncResult
参数
- callback
类型:System.AsyncCallback
收到批处理请求响应时所调用的委托。
- state
类型:System.Object
用户定义的状态对象,用于将上下文数据传递给回调方法。
- queries
类型:array<System.Data.Services.Client.DataServiceRequest[]
要包含在批处理请求中的查询请求数组。
返回值
类型:System.IAsyncResult
用于跟踪异步操作状态的 IAsyncResult 对象。
注释
返回的 IAsyncResult 对象可用于确定异步操作何时已完成。 有关详细信息,请参阅异步操作(WCF 数据服务)。
将查询指定为 DataServiceRequest<TElement> 实例。 返回表示整个批处理请求响应的 DataServiceResponse。 单个查询响应表示为 DataServiceResponse 对象,可通过枚举 DataServiceResponse 实例进行访问。
此方法返回时,已从网络流读取批处理请求的所有 HTTP 响应,但尚未对这些响应进行处理。 在枚举响应中的指定实体之前,未对该实体进行标识解析或对象具体化操作。