共用方式為


CorrelationMessageProperty.TryGet 方法

定義

嘗試從訊息或訊息屬性集合取得附加的 CorrelationMessageProperty

多載

TryGet(Message, CorrelationMessageProperty)

嘗試從指定訊息的 Properties 取得 CorrelationMessageProperty

TryGet(MessageProperties, CorrelationMessageProperty)

嘗試從指定訊息的屬性取得 CorrelationMessageProperty

TryGet(Message, CorrelationMessageProperty)

嘗試從指定訊息的 Properties 取得 CorrelationMessageProperty

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

參數

message
Message

包含要檢查之 Properties的訊息。

property
CorrelationMessageProperty

這個方法傳回時,會包括 CorrelationMessageProperty,其內含指定訊息的 Properties (如果有的話);否則為 null。 這個參數會以未初始化的狀態傳遞。

傳回

如果訊息的 Properties 包含 CorrelationMessageProperty,則為 true;否則為 false

適用於

TryGet(MessageProperties, CorrelationMessageProperty)

嘗試從指定訊息的屬性取得 CorrelationMessageProperty

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

參數

properties
MessageProperties

要檢查的訊息屬性。

property
CorrelationMessageProperty

這個方法傳回時,會包括在指定的訊息屬性中的 CorrelationMessageProperty (如果有的話),否則為 null。 這個參數會以未初始化的狀態傳遞。

傳回

如果訊息屬性包含 CorrelationMessageProperty,則為 true,否則為 false

適用於