WorkflowCompiler Class

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Note: This API is now obsolete.

Represents the compiler for workflows that are developed using C# or Visual Basic code and/or XAML markup. This class cannot be inherited.

Namespace:   System.Workflow.ComponentModel.Compiler
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

System.Object
  System.Workflow.ComponentModel.Compiler.WorkflowCompiler

[ObsoleteAttribute("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class WorkflowCompiler

NameDescription
System_CAPS_pubmethodWorkflowCompiler()

Initializes a new instance of the WorkflowCompiler class.

NameDescription
System_CAPS_pubmethodCompile(WorkflowCompilerParameters, String[])

Compiles a list of workflows contained in the files that are passed as parameters based on the WorkflowCompilerParameters.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_noteNote

This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

The following code example demonstrates how to create a new instance of the WorkflowCompiler class and run the Compile method. 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);

.NET Framework
Available since 3.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: