Share via


DataServiceContext.CancelRequest 方法

尝试取消与所提供的 IAsyncResult 对象关联的操作。

命名空间:  System.Data.Services.Client
程序集:  Microsoft.Data.Services.Client(在 Microsoft.Data.Services.Client.dll 中)

语法

声明
Public Sub CancelRequest ( _
    asyncResult As IAsyncResult _
)
用法
Dim instance As DataServiceContext
Dim asyncResult As IAsyncResult

instance.CancelRequest(asyncResult)
public void CancelRequest(
    IAsyncResult asyncResult
)
public:
void CancelRequest(
    IAsyncResult^ asyncResult
)
member CancelRequest : 
        asyncResult:IAsyncResult -> unit 
public function CancelRequest(
    asyncResult : IAsyncResult
)

参数

注释

传递给 asyncResult 参数的 IAsyncResult 对象是以异步方式执行操作时返回的对象。 有关详细信息,请参阅异步操作(WCF 数据服务)。在处理此请求之前,DataServiceContext 实例处于不可预测状态。 当 asyncResult 的 IsCompleted 属性返回值 true 时,可安全使用 DataServiceContext

请参阅

参考

DataServiceContext 类

System.Data.Services.Client 命名空间