Edytuj

Udostępnij za pośrednictwem


SendMessageContent Class

Definition

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.

public ref class SendMessageContent sealed : System::ServiceModel::Activities::SendContent
[System.Windows.Markup.ContentProperty("Message")]
public sealed class SendMessageContent : System.ServiceModel.Activities.SendContent
[<System.Windows.Markup.ContentProperty("Message")>]
type SendMessageContent = class
    inherit SendContent
Public NotInheritable Class SendMessageContent
Inherits SendContent
Inheritance
SendMessageContent
Attributes

Examples

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))
};

Remarks

When using this class, messages serialized on the wire are unwrapped, unless the data is a message contract type or of type Message.

Constructors

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.

Properties

DeclaredMessageType

Gets or sets the declared message type.

Message

Gets or sets the data to send.

Methods

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()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
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)

Applies to