Muokkaa

Jaa


ReceiveActivity.ServiceOperationInfo Property

Definition

Defines the contract and service operation that the ReceiveActivity activity implements.

public:
 property System::Workflow::Activities::OperationInfoBase ^ ServiceOperationInfo { System::Workflow::Activities::OperationInfoBase ^ get(); void set(System::Workflow::Activities::OperationInfoBase ^ value); };
[System.ComponentModel.Browsable(true)]
public System.Workflow.Activities.OperationInfoBase ServiceOperationInfo { get; set; }
[<System.ComponentModel.Browsable(true)>]
member this.ServiceOperationInfo : System.Workflow.Activities.OperationInfoBase with get, set
Public Property ServiceOperationInfo As OperationInfoBase

Property Value

An OperationInfoBase object that contains the contract name, the contract type, the operation name, (which could be distinct from method name), whether the operation is a one-way operation, and method information including parameters about the operation.

Attributes

Examples

The following example shows how to access the ServiceOperationInfo 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;

Remarks

The ServiceOperationInfo property can be set to an instance of type TypedOperationInfo or OperationInfo. TypedOperationInfo can be used to configure a receive activity using an existing Windows Communication Foundation (WCF) service contract.

An instance of OperationInfo can be used to configure a receive activity for the workflow-first contract scenario.

Applies to