語言

ReceiveContext.TryGet 方法

定義

嘗試取得接收上下文。

多載

名稱 Description
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

適用於