SendAndReceiveReply Template Designer

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The SendAndReceiveReply template is used to create a pair of pre-configured Send and ReceiveReply activities. The activities are part of a Sequence activity, and are correlated as part of a request/response message exchange pattern on the client.

The SendAndReceiveReply template

Adding the SendAndReceiveReply template does three things besides creating the Send and ReceiveReply activities within a Sequence activity:

Use the SendAndReceiveReply Template Designer

Access the SendAndReceiveReply activity designer in the Messaging category of the Toolbox. The SendAndReceiveReply activity designer can be dragged from the Toolbox and dropped on to the Workflow Designer surface wherever activities are usually placed. Dropping the activity designer creates a Send activity that can be configured with the Send activity designer and a correlated ReceiveReply that can be configured with the ReceiveReplyForSend designer.

For more information about using the Send designer to configure the Send activity, see Send.

Properties of ReceiveReply

The following table shows the ReceiveReply properties and describes how they're used in the designer. These properties can be edited in properties grid, and some can be edited on the Workflow Designer surface.

Property Name Required Usage
DisplayName False The optional friendly name of the ReceiveReply activity. The default is ReceiveReplyForSend.

Although the use of a non-default value for the friendly DisplayName is not strictly required, it's best to use such a value.
Request True Reference to the Send activity paired with this ReceiveReply activity. This property must not be null. Send and ReceiveReply activities are used together on the client to model a request/response messaging pattern. This property specifies which Send activity is paired. In the designer, you can't edit this property because it's automatically bound to the Send activity from which you created the ReceiveReply activity.
Content False Specifies the message or parameter content to receive. It can be either a ReceiveMessageContent activity or a ReceiveParametersContent activity. Edit this property by clicking the ellipsis button next to the Content field in the property grid, or by clicking the Define button next to the Content label on the Receive activity designer surface. Both display the Content Definition dialog. For more information about how to use this box, see Content Definition Dialog Box.
CorrelationInitializers False Specifies the collection of CorrelationInitializer objects that initialize multiple CorrelationHandle objects that configure this Receive activity within the workflow. Click the ellipsis button next to the CorrelationInitializers property in the properties grid to open the Add Correlation Initializers dialog box. For more information about using this box, see Add CorrelationInitializers Dialog Box.
Action False Specifies the action header of the message. If it's not explicitly set, its value defaults to:

https://tempuri.org/{service contract namespace}/{service contract name}/{operation name}.

See also