SendActivity.ParameterBindings Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the collection of bindable parameters as found in the Windows Communication Foundation (WCF) service's formal parameter list.
public:
property System::Workflow::ComponentModel::WorkflowParameterBindingCollection ^ ParameterBindings { System::Workflow::ComponentModel::WorkflowParameterBindingCollection ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Workflow.ComponentModel.WorkflowParameterBindingCollection ParameterBindings { get; }
[<System.ComponentModel.Browsable(false)>]
member this.ParameterBindings : System.Workflow.ComponentModel.WorkflowParameterBindingCollection
Public ReadOnly Property ParameterBindings As WorkflowParameterBindingCollection
Property Value
The WorkflowParameterBindingCollection of parameters to bind to.
- Attributes
Examples
The following example shows how to access the ParameterBindings
property. This example was adapted from the Conversations
SDK sample.
channelToken1.EndpointName = "Shipper3Endpoint";
channelToken1.Name = "Shipper3Endpoint";
channelToken1.OwnerActivityName = "GetShippingQuotes";
RequestQuoteFromShipper3.ChannelToken = channelToken1;
RequestQuoteFromShipper3.Name = "RequestQuoteFromShipper3";
activityBind2.Name = "SupplierWorkflow";
activityBind2.Path = "order";
workflowParameterBinding2.ParameterName = "po";
workflowParameterBinding2.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activityBind2)));
activityBind3.Name = "SupplierWorkflow";
activityBind3.Path = "contextShipper3";
workflowParameterBinding3.ParameterName = "context";
workflowParameterBinding3.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activityBind3)));
activityBind4.Name = "SupplierWorkflow";
activityBind4.Path = "ackShipper3";
workflowParameterBinding4.ParameterName = "(ReturnValue)";
workflowParameterBinding4.SetBinding(System.Workflow.ComponentModel.WorkflowParameterBinding.ValueProperty, ((System.Workflow.ComponentModel.ActivityBind)(activityBind4)));
RequestQuoteFromShipper3.ParameterBindings.Add(workflowParameterBinding2);
RequestQuoteFromShipper3.ParameterBindings.Add(workflowParameterBinding3);
RequestQuoteFromShipper3.ParameterBindings.Add(workflowParameterBinding4);
Remarks
ParameterBindings can be used to specify bindings between the service operation parameters and public field and properties of the workflow that contains the SendActivity activity. When the SendActivity activity executes, the corresponding parameter values are read from the workflow properties they are bound to and are sent to the service as service operation parameters.
ParameterBindings can also be used to retrieve the return values from a service operation.
All parameters of the service operation should be bound. Unbound service operation parameters produce compiler warnings and the default values of the parameter are sent when the SendActivity is invoked.
Applies to
.NET