WorkflowCompiler WorkflowCompiler WorkflowCompiler WorkflowCompiler Class

Definition

Warning

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.

public ref class WorkflowCompiler sealed
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class WorkflowCompiler
type WorkflowCompiler = class
Public NotInheritable Class WorkflowCompiler
Inheritance
WorkflowCompilerWorkflowCompilerWorkflowCompilerWorkflowCompiler
Attributes

Examples

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);
' 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)

Remarks

Note

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

Constructors

WorkflowCompiler() WorkflowCompiler() WorkflowCompiler() WorkflowCompiler()

Initializes a new instance of the WorkflowCompiler class.

Methods

Compile(WorkflowCompilerParameters, String[]) Compile(WorkflowCompilerParameters, String[]) Compile(WorkflowCompilerParameters, String[]) Compile(WorkflowCompilerParameters, String[])

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

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to