Edit

Share via


WorkflowCompiler Constructor

Definition

Initializes a new instance of the WorkflowCompiler class.

C#
public WorkflowCompiler();

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.

C#
// 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);

Applies to

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1