IReplyChannel.EndTryReceiveRequest(IAsyncResult, RequestContext) 方法

定义

完成用于接收请求消息的指定异步操作。

public:
 bool EndTryReceiveRequest(IAsyncResult ^ result, [Runtime::InteropServices::Out] System::ServiceModel::Channels::RequestContext ^ % context);
public bool EndTryReceiveRequest (IAsyncResult result, out System.ServiceModel.Channels.RequestContext context);
abstract member EndTryReceiveRequest : IAsyncResult * RequestContext -> bool
Public Function EndTryReceiveRequest (result As IAsyncResult, ByRef context As RequestContext) As Boolean

参数

context
RequestContext

接收到的 RequestContext

返回

如果在经历指定的时间间隔之前接收到请求消息,则为 true;否则为 false

示例

下面的代码演示如何实现此方法:

public bool EndTryReceiveRequest(IAsyncResult result, out RequestContext requestContext)
{
    return TryReceiveRequestAsyncResult.End(result, out requestContext);
}

适用于