Share via


ReceiveActivity.ServiceOperationInfo プロパティ

定義

ReceiveActivity アクティビティが実装するコントラクトおよびサービス操作を定義します。

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

プロパティ値

コントラクト名、コントラクト型、操作名 (実際のメソッド名と異なる場合がある)、その操作が一方向の操作かどうか、および操作についてのパラメーターなどのメソッド情報を含んでいる OperationInfoBase オブジェクト。

属性

次の例は、ServiceOperationInfo プロパティにアクセスする方法を示しています。 このコードは、Conversations ファイルの ShipperWorkflow.designer.cs SDK サンプルを作成し直したものです。

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;

注釈

ServiceOperationInfo プロパティは、型が TypedOperationInfo または OperationInfo のインスタンスに設定することができます。 TypedOperationInfo は、既存の Windows Communication Foundation (WCF) サービス コントラクトを使用して受信アクティビティを構成するために使用できます。

OperationInfo のインスタンスを使用して、ワークフロー優先のコントラクト シナリオの受信アクティビティを構成できます。

適用対象