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);
}

适用于