語言

ContextMessageProperty.TryGet 方法

定義

嘗試從指定的訊息或訊息屬性集合中取得 。ContextMessageProperty

多載

名稱 Description
TryGet(Message, ContextMessageProperty)

嘗試從指定訊息的屬性中取得 。ContextMessageProperty

TryGet(MessageProperties, ContextMessageProperty)

嘗試從指定的訊息屬性集合中取得 。ContextMessageProperty

TryGet(Message, ContextMessageProperty)

嘗試從指定訊息的屬性中取得 。ContextMessageProperty

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

參數

message
Message

要從中 Message 擷取上下文訊息屬性。

contextMessageProperty
ContextMessageProperty

當此方法返回 true時, contextMessageProperty 包含 ContextMessageProperty 包含 ContextMessageProperty 的 ,且 與 相關聯 message。 這個參數會未初始化傳遞。

傳回

true當 從 ContextMessageProperty得到 的值message時;否則, false。

適用於

TryGet(MessageProperties, ContextMessageProperty)

嘗試從指定的訊息屬性集合中取得 。ContextMessageProperty

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

參數

properties
MessageProperties

要從中 MessageProperties 擷取上下文訊息屬性。

contextMessageProperty
ContextMessageProperty

當此方法返回 true時, contextMessageProperty 包含 ContextMessageProperty 包含 ContextMessageProperty 的 ,且 與 相關聯 properties。 這個參數會未初始化傳遞。

傳回

true當 從 ContextMessageProperty得到 的值properties時;否則, false。

適用於