ContextMessageProperty Class

 

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

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

System.Object
  System.ServiceModel.Channels.ContextMessageProperty

[SerializableAttribute]
public class ContextMessageProperty : IMessageProperty

NameDescription
System_CAPS_pubmethodContextMessageProperty()

Initializes a new instance of the ContextMessageProperty class.

System_CAPS_pubmethodContextMessageProperty(IDictionary<String, String>)

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

NameDescription
System_CAPS_pubpropertyContext

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

System_CAPS_pubpropertySystem_CAPS_staticName

Gets the name of the context message property.

NameDescription
System_CAPS_pubmethodAddOrReplaceInMessage(Message)

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

System_CAPS_pubmethodAddOrReplaceInMessageProperties(MessageProperties)

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

System_CAPS_pubmethodCreateCopy()

Creates a copy of the current instance of ContextMessageProperty.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticTryCreateFromHttpCookieHeader(String, ContextMessageProperty)

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

System_CAPS_pubmethodSystem_CAPS_staticTryGet(Message, ContextMessageProperty)

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

System_CAPS_pubmethodSystem_CAPS_staticTryGet(MessageProperties, ContextMessageProperty)

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

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 SetContextproperties.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: