PolicyActivity 构造函数

定义

初始化 PolicyActivity 类的新实例。

重载

PolicyActivity()

初始化 PolicyActivity 类的新实例。

PolicyActivity(String)

使用活动名初始化 PolicyActivity 的新实例。

PolicyActivity()

初始化 PolicyActivity 类的新实例。

public:
 PolicyActivity();
public PolicyActivity ();
Public Sub New ()

示例

下面的代码示例演示如何创建 PolicyActivity 类的新实例并设置其属性。 此代码示例摘自 SimplePolicyWorkflow.designer.cs 文件中的“RuleActionTrackingEventSample”SDK 示例。 有关详细信息,请参阅 RuleActionTrackingEvent 示例

// A workflow is always run asychronously; the main thread waits on this event so the program
// doesn't exit before the workflow completes
workflowRuntime.AddService(new SqlWorkflowPersistenceService("Initial Catalog=SqlPersistenceService;Data Source=localhost;Integrated Security=SSPI;"));
' A workflow is always run asychronously the main thread waits on Me event so the program
' doesn't exit before the workflow completes
WorkflowRuntime.AddService(New SqlWorkflowPersistenceService("Initial Catalog=SqlPersistenceServiceData Source=localhostIntegrated Security=SSPI"))

另请参阅

适用于

PolicyActivity(String)

使用活动名初始化 PolicyActivity 的新实例。

public:
 PolicyActivity(System::String ^ name);
public PolicyActivity (string name);
new System.Workflow.Activities.PolicyActivity : string -> System.Workflow.Activities.PolicyActivity
Public Sub New (name As String)

参数

name
String

活动的用户定义名称。

另请参阅

适用于