WorkflowInvoker(Activity) Constructor

Definition

Initializes a new instance of the WorkflowInvoker class.

public:
 WorkflowInvoker(System::Activities::Activity ^ workflow);
public WorkflowInvoker (System.Activities.Activity workflow);
new System.Activities.WorkflowInvoker : System.Activities.Activity -> System.Activities.WorkflowInvoker
Public Sub New (workflow As Activity)

Parameters

workflow
Activity

The workflow definition of the workflow to be invoked by this instance of the WorkflowInvoker class.

Examples

The following example invokes a workflow consisting of a single WriteLine activity.

Activity wf = new WriteLine
{
    Text = "Hello World."
};

WorkflowInvoker invoker = new WorkflowInvoker(wf);

invoker.Invoke();

Remarks

WorkflowInvoker contains both instance and static methods for invoking workflows synchronously, and instance methods for invoking workflows asynchronously.

Applies to