ContextMessageProperty.TryGet Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to get the ContextMessageProperty
from a specified message or collection of message properties.
Overloads
TryGet(Message, ContextMessageProperty) |
Attempts to get the |
TryGet(MessageProperties, ContextMessageProperty) |
Attempts to get the |
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
- 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
.