IReplyChannel.EndTryReceiveRequest(IAsyncResult, RequestContext) 方法

定義

完成指定的非同步作業,以便接收要求訊息。Completes the specified asynchronous operation to receive a request message.

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

所接收的 RequestContextThe RequestContext received.

傳回

如果在超過指定時間間隔之前接收到要求訊息,則為 true,否則為 falsetrue if a request message is received before the specified interval of time elapses; otherwise false.

範例

下列程式碼說明如何實作這個方法:The following code illustrates how to implement this method:

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

適用於