Gets the collection of bindable parameters as found in the service's formal parameter list.
Assembly: System.WorkflowServices (in System.WorkflowServices.dll)
can be used to specify a binding between the service operation parameters and public field/properties of the workflow that contain the ReceiveActivity activity. When a client invokes the operation, the corresponding parameter values are written to bound workflow properties during the receive activity's execution.
can also be used by the receive activity's child activities to read the parameter values passed in by client invocation. Child activities can use the collection to set the return value of the parent ReceiveActivity activity.
All parameters of the service contract should be included in the ParameterBindings property. Unbound parameters cause compiler warnings upon compilation and an exception can occur when the ReceiveActivity returns this message back to the client.
The following example shows how to access the ParameterBindings property. This code was adapted from the Conversations SDK sample, from the ShipperWorkflow.designer.cs file.
ReceiveActivity receiveQuoteFromShipper1 = new ReceiveActivity(); CodeActivity shipper1ShippingQuote = new CodeActivity(); ContextToken contextToken1 = new ContextToken(); ActivityBind activityBind1 = new ActivityBind(); WorkflowParameterBinding workflowParameterBinding1 = new WorkflowParameterBinding(); TypedOperationInfo typedOperationInfo1 = new TypedOperationInfo(); receiveQuoteFromShipper1.Activities.Add(shipper1ShippingQuote); contextToken1.Name = "Shipper1Context"; contextToken1.OwnerActivityName = "GetShippingQuotes"; receiveQuoteFromShipper1.ContextToken = contextToken1; receiveQuoteFromShipper1.Name = "receiveQuoteFromShipper1"; activityBind1.Name = "SupplierWorkflow"; activityBind1.Path = "quoteShipper1"; workflowParameterBinding1.ParameterName = "quote"; workflowParameterBinding1.SetBinding(WorkflowParameterBinding.ValueProperty, ((ActivityBind)(activityBind1))); receiveQuoteFromShipper1.ParameterBindings.Add(workflowParameterBinding1); typedOperationInfo1.ContractType = typeof(IShippingQuote); typedOperationInfo1.Name = "ShippingQuote"; receiveQuoteFromShipper1.ServiceOperationInfo = typedOperationInfo1;
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.