CorrelationDataMessageProperty.TryGet 方法

定义

尝试从某个消息或某个消息属性的集合获取附加的 CorrelationDataMessageProperty

重载

TryGet(Message, CorrelationDataMessageProperty)

尝试从指定消息的 Properties 获取 CorrelationDataMessageProperty

TryGet(MessageProperties, CorrelationDataMessageProperty)

尝试从指定的消息属性获取 CorrelationDataMessageProperty

TryGet(Message, CorrelationDataMessageProperty)

尝试从指定消息的 Properties 获取 CorrelationDataMessageProperty

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

参数

message
Message

包含要检查的 Properties 的消息。

property
CorrelationDataMessageProperty

当此方法返回时,将包含指定消息的 CorrelationDataMessageProperty 中含有的 Properties;否则为 null。 此参数未经初始化即被传递。

返回

Boolean

如果消息的 Properties 属性包含 CorrelationDataMessageProperty 类,则为 true;否则为 false

适用于

TryGet(MessageProperties, CorrelationDataMessageProperty)

尝试从指定的消息属性获取 CorrelationDataMessageProperty

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

参数

properties
MessageProperties

要检查的消息属性。

property
CorrelationDataMessageProperty

当此方法返回时,将包含指定的消息属性中含有的 CorrelationDataMessageProperty;否则为 null。 此参数未经初始化即被传递。

返回

Boolean

如果消息属性包含 CorrelationDataMessageProperty,则为 true;否则为 false

适用于