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

当此方法返回时,将包含由指定消息的 Properties 所包含的 CorrelationMessageProperty(如果有的话);否则为 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

适用于