Bewerken

Share via


WorkflowCompiler Constructor

Definition

Initializes a new instance of the WorkflowCompiler class.

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

Examples

The following code example demonstrates how to create a new instance of the WorkflowCompiler class. The code also creates a new instance of the WorkflowCompilerParameters class and sets some of its values. This code assumes that results is of type WorkflowCompilerResults. This code example is part of the Outlook Workflow Wizard SDK sample from the WizardForm.cs file. For more information, see Outlook Workflow Wizard.

// Compile the workflow
String[] assemblyNames = { "ReadEmailActivity.dll" };
WorkflowCompiler compiler = new WorkflowCompiler();
WorkflowCompilerParameters parameters = new WorkflowCompilerParameters(assemblyNames);
parameters.LibraryPaths.Add(Path.GetDirectoryName(typeof(BaseMailbox).Assembly.Location));
parameters.OutputAssembly = "CustomOutlookWorkflow" + Guid.NewGuid().ToString() + ".dll";
results = compiler.Compile(parameters, this.xamlFile);
' Compile the workflow
Dim assemblyNames() As String = {"ReadEmailActivity.dll"}

Dim compiler As WorkflowCompiler = New WorkflowCompiler()
Dim parameters As WorkflowCompilerParameters = New WorkflowCompilerParameters(assemblyNames)
parameters.LibraryPaths.Add(Path.GetDirectoryName(GetType(BaseMailbox).Assembly.Location))
parameters.OutputAssembly = "CustomOutlookWorkflow" + Guid.NewGuid().ToString() + ".dll"
results = compiler.Compile(parameters, Me.xamlFile)

Applies to