WorkflowCompiler 類別

定義

警告

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

表示工作流程的編譯器,這些工作流程是使用 C# 或 Visual Basic 程式碼和/或 XAML 標記所開發的。 此類別無法獲得繼承。

public ref class WorkflowCompiler sealed
public sealed class WorkflowCompiler
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class WorkflowCompiler
type WorkflowCompiler = class
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type WorkflowCompiler = class
Public NotInheritable Class WorkflowCompiler
繼承
WorkflowCompiler
屬性

範例

下列程式碼範例示範如何建立 WorkflowCompiler 類別的新執行個體,並執行 Compile 方法。 程式碼也會建立 WorkflowCompilerParameters 類別的新執行個體,並設定它的某些值。 這段程式碼假設 results 的型別為 WorkflowCompilerResults。 這個程式碼範例是 WizardForm.cs 檔案中<Outlook 工作流程精靈 SDK>範例的一部分。 如需詳細資訊,請參閱Outlook工作流程精靈

// 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)

備註

注意

此資料討論已被汰換的類型及命名空間。 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型

建構函式

WorkflowCompiler()

初始化 WorkflowCompiler 類別的新執行個體。

方法

Compile(WorkflowCompilerParameters, String[])

編譯包含在檔案中的工作流程清單,這些工作流程會根據 WorkflowCompilerParameters 當做參數傳遞。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於