DataServiceQuery.BeginExecute 方法
异步发送请求以执行数据服务查询。
命名空间: System.Data.Services.Client
程序集: Microsoft.Data.Services.Client(在 Microsoft.Data.Services.Client.dll 中)
语法
声明
Public Function BeginExecute ( _
callback As AsyncCallback, _
state As Object _
) As IAsyncResult
用法
Dim instance As DataServiceQuery
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult
returnValue = instance.BeginExecute(callback, _
state)
public IAsyncResult BeginExecute(
AsyncCallback callback,
Object state
)
public:
IAsyncResult^ BeginExecute(
AsyncCallback^ callback,
Object^ state
)
member BeginExecute :
callback:AsyncCallback *
state:Object -> IAsyncResult
public function BeginExecute(
callback : AsyncCallback,
state : Object
) : IAsyncResult
参数
- callback
类型:System.AsyncCallback
当结果可供客户端使用时将调用的委托。
- state
类型:System.Object
已传递到回调的用户定义的状态对象。
返回值
类型:System.IAsyncResult
用于跟踪异步操作状态的 IAsyncResult 对象。
注释
返回的 IAsyncResult 对象可用于确定异步操作何时已完成。 有关详细信息,请参阅异步操作(WCF 数据服务)。
BeginExecute 方法使用与 Execute 方法相同的语义,但 BeginExecute 异步发送请求,因此此调用在等待服务返回的结果时不会阻止处理。 根据标准的 begin-end 异步模式,在检索查询结果时将调用所提供的回调。