共用方式為


IInputChannel.EndTryReceive(IAsyncResult, Message) 方法

定義

完成指定的非同步作業,以便接收訊息。

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

參數

message
Message

所接收的 Message

傳回

如果在超過指定時間間隔之前接收到訊息,則為 true,否則為 false

範例

下列程式碼說明如何實作這個方法:

public bool EndTryReceive(IAsyncResult result, out Message message)
{
    return TryReceiveAsyncResult<TChannel>.End(result, out message);
}

適用於