Editare

Partajați prin


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, [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

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

TryGet(MessageProperties, ContextMessageProperty)

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

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

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