SendMessageContent Class
A class used to send a single item (message) to or from a workflow service. The item can be a built-in type such as primitive types, Message, or XElement; or an application-defined data contract, message contract, or XML serializable type.
Assembly: System.ServiceModel.Activities (in System.ServiceModel.Activities.dll)
System.ServiceModel.Activities::SendContent
System.ServiceModel.Activities::SendMessageContent
| Name | Description | |
|---|---|---|
![]() | SendMessageContent() | Initializes a new instance of the SendMessageContent class. |
![]() | SendMessageContent(InArgument^) | Initializes a new instance of the SendMessageContent class with the specified data to send. |
![]() | SendMessageContent(InArgument^, Type^) | Initializes a new instance of the SendMessageContent class with the specified message and message type. |
| Name | Description | |
|---|---|---|
![]() | DeclaredMessageType | Gets or sets the declared message type. |
![]() | Message | Gets or sets the data to send. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | ShouldSerializeDeclaredMessageType() | Gets a value that indicates whether the DeclaredMessageType property should be XAML-serialized. |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
When using this class, messages serialized on the wire are unwrapped, unless the data is a message contract type or of type Message.
The following example shows how to use a SendMessageContent instance with a Send activity.
Variable<PurchaseOrder> po = new Variable<PurchaseOrder>(); Variable<Customer> customer = new Variable<Customer>(); Endpoint clientEndpoint = new Endpoint { Binding = Constants.Binding, AddressUri = new Uri(Constants.ServiceAddress) }; Send submitPO = new Send { Endpoint = clientEndpoint, ServiceContractName = Constants.POContractName, OperationName = Constants.SubmitPOName, Content = new SendMessageContent(new InArgument<PurchaseOrder>(po)) };
Available since 4.0
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

