ReceiveContext.TryGet 方法

定义

尝试获取接收上下文。

重载

TryGet(Message, ReceiveContext)

尝试从指定的消息获取接收上下文。

TryGet(MessageProperties, ReceiveContext)

尝试从指定的消息属性集合获取接收上下文。

TryGet(Message, ReceiveContext)

尝试从指定的消息获取接收上下文。

public:
 static bool TryGet(System::ServiceModel::Channels::Message ^ message, [Runtime::InteropServices::Out] System::ServiceModel::Channels::ReceiveContext ^ % property);
public static bool TryGet (System.ServiceModel.Channels.Message message, out System.ServiceModel.Channels.ReceiveContext property);
static member TryGet : System.ServiceModel.Channels.Message * ReceiveContext -> bool
Public Shared Function TryGet (message As Message, ByRef property As ReceiveContext) As Boolean

参数

message
Message

消息。

property
ReceiveContext

接收上下文。

返回

如果成功检索到接收上下文,则为 true;否则为 false

适用于

TryGet(MessageProperties, ReceiveContext)

尝试从指定的消息属性集合获取接收上下文。

public:
 static bool TryGet(System::ServiceModel::Channels::MessageProperties ^ properties, [Runtime::InteropServices::Out] System::ServiceModel::Channels::ReceiveContext ^ % property);
public static bool TryGet (System.ServiceModel.Channels.MessageProperties properties, out System.ServiceModel.Channels.ReceiveContext property);
static member TryGet : System.ServiceModel.Channels.MessageProperties * ReceiveContext -> bool
Public Shared Function TryGet (properties As MessageProperties, ByRef property As ReceiveContext) As Boolean

参数

properties
MessageProperties

消息属性集合。

property
ReceiveContext

接收上下文。

返回

如果成功检索到接收上下文,则为 true;否则为 false

适用于