ContextMessageProperty ContextMessageProperty ContextMessageProperty ContextMessageProperty Class

Definition

A property used to communicate context between the application and channel layers on either the client or the service.

public ref class ContextMessageProperty : System::ServiceModel::Channels::IMessageProperty
[System.Serializable]
public class ContextMessageProperty : System.ServiceModel.Channels.IMessageProperty
type ContextMessageProperty = class
    interface IMessageProperty
Public Class ContextMessageProperty
Implements IMessageProperty
Inheritance
ContextMessagePropertyContextMessagePropertyContextMessagePropertyContextMessageProperty
Attributes
Implements

Remarks

A collection of properties that are added to a Message that correlates messages that form part of a conversation between a client and a service.

If Enabled is true, context is established at the channel layer, and all incoming messages on the client and the service have this context property attached by the context channel. If Enabled is false the ContextMessageProperty is used to attach context to an outgoing message on the client or the service at the application layer.

The ContextMessageProperty can be used on the client or on the service. Alternatively, on the client only, the current context can be obtained or a new context can be set on channel instance using GetContext and SetContext properties.

Constructors

ContextMessageProperty() ContextMessageProperty() ContextMessageProperty() ContextMessageProperty()

Initializes a new instance of the ContextMessageProperty class.

ContextMessageProperty(IDictionary<String,String>) ContextMessageProperty(IDictionary<String,String>) ContextMessageProperty(IDictionary<String,String>) ContextMessageProperty(IDictionary<String,String>)

Initializes a new instance of the ContextMessageProperty class with a specified context.

Properties

Context Context Context Context

Gets the context used to correlate messages within a conversation between a client and a service.

Name Name Name Name

Gets the name of the context message property.

Methods

AddOrReplaceInMessage(Message) AddOrReplaceInMessage(Message) AddOrReplaceInMessage(Message) AddOrReplaceInMessage(Message)

Sets the value of the ContextMessageProperty property in a specified Message from the current instance of ContextMessageProperty.

AddOrReplaceInMessageProperties(MessageProperties) AddOrReplaceInMessageProperties(MessageProperties) AddOrReplaceInMessageProperties(MessageProperties) AddOrReplaceInMessageProperties(MessageProperties)

Sets the value of the ContextMessageProperty property in a specified collection of MessageProperties from the current instance of ContextMessageProperty.

CreateCopy() CreateCopy() CreateCopy() CreateCopy()

Creates a copy of the current instance of ContextMessageProperty.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
TryCreateFromHttpCookieHeader(String, ContextMessageProperty) TryCreateFromHttpCookieHeader(String, ContextMessageProperty) TryCreateFromHttpCookieHeader(String, ContextMessageProperty) TryCreateFromHttpCookieHeader(String, ContextMessageProperty)

Attempts to instantiate a ContextMessageProperty from the key/value pairs of a specified HTTP cookie.

TryGet(Message, ContextMessageProperty) TryGet(Message, ContextMessageProperty) TryGet(Message, ContextMessageProperty) TryGet(Message, ContextMessageProperty)

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

TryGet(MessageProperties, ContextMessageProperty) TryGet(MessageProperties, ContextMessageProperty) TryGet(MessageProperties, ContextMessageProperty) TryGet(MessageProperties, ContextMessageProperty)

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

Applies to

See also