Bewerken

Share via


PolicyActivity Constructors

Definition

Initializes a new instance of the PolicyActivity class.

Overloads

PolicyActivity()

Initializes a new instance of the PolicyActivity class.

PolicyActivity(String)

Initializes a new instance of the PolicyActivity using the name of the activity.

PolicyActivity()

Initializes a new instance of the PolicyActivity class.

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

Examples

The following code example shows how to create a new instance of the PolicyActivity class and set its properties. This code example is part of the RuleActionTrackingEventSample SDK sample from the SimplePolicyWorkflow.designer.cs file. For more information, see RuleActionTrackingEvent Sample.

// 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"))

See also

Applies to

PolicyActivity(String)

Initializes a new instance of the PolicyActivity using the name of the activity.

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)

Parameters

name
String

The user-defined name of the activity.

See also

Applies to