CallExternalMethodActivity.InterfaceType 属性
定义
获取或设置外部方法的具有 ExternalDataExchangeAttribute 的声明接口。Gets or sets an external method's declaring interface that has the ExternalDataExchangeAttribute.
public:
virtual property Type ^ InterfaceType { Type ^ get(); void set(Type ^ value); };
[System.Workflow.ComponentModel.Design.TypeFilterProvider(typeof(System.Workflow.Activities.ExternalDataExchangeInterfaceTypeFilterProvider))]
public virtual Type InterfaceType { get; set; }
[<System.Workflow.ComponentModel.Design.TypeFilterProvider(typeof(System.Workflow.Activities.ExternalDataExchangeInterfaceTypeFilterProvider))>]
member this.InterfaceType : Type with get, set
Public Overridable Property InterfaceType As Type
属性值
外部方法的具有 ExternalDataExchangeAttribute 的声明接口。The external method's declaring interface that has the ExternalDataExchangeAttribute.
- 属性
示例
下面的代码示例演示如何设置 InterfaceType 属性。The following code example shows how to set the InterfaceType property. 接口类型必须具有 ExternalDataExchangeAttribute 属性。The interface type must be attributed with the ExternalDataExchangeAttribute. 此代码示例摘自 PurchaseOrderWorkflow.Designer.cs 文件中的“侦听”SDK 示例。This code example is part of the Listen SDK sample from the PurchaseOrderWorkflow.Designer.cs file. 有关详细信息,请参阅 侦听示例。For more information, see Listen Sample.
this.CreatePO.InterfaceType = typeof(IOrderService);
this.CreatePO.MethodName = "CreateOrder";
this.CreatePO.Name = "CreatePO";
this.CreatePO.MethodInvoking += new System.EventHandler(this.OnBeforeCreateOrder);
Me.CreatePO.InterfaceType = GetType(IOrderService)
Me.CreatePO.MethodName = "CreateOrder"
Me.CreatePO.Name = "CreatePO"
AddHandler Me.CreatePO.MethodInvoking, AddressOf Me.OnBeforeCreateOrder