MessageDescription Class
Represents the description of a message.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
The MessageDescription type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | MessageDescription | Initializes a new instance of the MessageDescription class with a specified action and direction. |
| Name | Description | |
|---|---|---|
![]() ![]() | Action | Gets or sets the action parameter of the SOAP message that identifies the intent of the message. |
![]() ![]() | Body | Gets the body of the SOAP message. |
![]() ![]() | Direction | Gets the direction that indicates whether the message is incoming or outgoing. |
![]() | HasProtectionLevel | Gets a value that indicates whether the ProtectionLevel has been set. |
![]() | Headers | Gets the description of the headers of the SOAP message. |
![]() ![]() | MessageType | Gets or sets a type that identifies the type of message contract. |
![]() | Properties | Gets a description of the properties of the SOAP message. |
![]() | ProtectionLevel | Gets or sets the security services required for the message. |
| Name | Description | |
|---|---|---|
![]() ![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() ![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() ![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() ![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ShouldSerializeProtectionLevel | Returns a value that indicates whether the ProtectionLevel property has changed from its default value and should be serialized. |
![]() ![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The MessageDescription contains the Headers and Body properties to provide get access to these parts of the message. Whether the message is incoming or outgoing is indicated by the Direction property. It also provides an Action property where the URI that indicates the intension of the message may be specified.
The following example uses the MessageDescription returned from Messages property of the OperationDescription class. The code iterates through the collection of endpoints and prints each endpoint name, as well as the name of each operation in the endpoint.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

