Прочетете на английски Редактиране

Споделяне чрез


ContextMessageProperty.TryGet Method

Definition

Attempts to get the ContextMessageProperty from a specified message or collection of message properties.

Overloads

TryGet(Message, ContextMessageProperty)

Attempts to get the ContextMessageProperty from the properties of a specified message.

TryGet(MessageProperties, ContextMessageProperty)

Attempts to get the ContextMessageProperty from a specified collection of message properties.

TryGet(Message, ContextMessageProperty)

Attempts to get the ContextMessageProperty from the properties of a specified message.

public static bool TryGet (System.ServiceModel.Channels.Message message, out System.ServiceModel.Channels.ContextMessageProperty contextMessageProperty);

Parameters

message
Message

The Message from which the context message properties are to be retrieved.

contextMessageProperty
ContextMessageProperty

When this method returns true, contextMessageProperty contains a ContextMessageProperty that contains the ContextMessageProperty that is associated with the message. This parameter is passed uninitialized.

Returns

true when a value for the ContextMessageProperty is obtained from the message; otherwise, false.

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

TryGet(MessageProperties, ContextMessageProperty)

Attempts to get the ContextMessageProperty from a specified collection of message properties.

public static bool TryGet (System.ServiceModel.Channels.MessageProperties properties, out System.ServiceModel.Channels.ContextMessageProperty contextMessageProperty);

Parameters

properties
MessageProperties

The MessageProperties from which the context message properties are to be retrieved.

contextMessageProperty
ContextMessageProperty

When this method returns true, contextMessageProperty contains a ContextMessageProperty that contains the ContextMessageProperty that is associated with the properties. This parameter is passed uninitialized.

Returns

true when a value for the ContextMessageProperty is obtained from the properties; otherwise, false.

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1