WorkflowCompiler Classe

Definizione

Attenzione

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

Rappresenta il compilatore per i flussi di lavoro sviluppati utilizzando C# o Visual Basic e/o markup XAML. La classe non può essere ereditata.

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
Ereditarietà
WorkflowCompiler
Attributi

Esempio

Nell'esempio riportato di seguito viene illustrato come creare una nuova istanza della classe WorkflowCompiler ed eseguire il metodo Compile. Il codice crea inoltre una nuova istanza della classe WorkflowCompilerParameters e ne imposta alcuni valori. Questo codice presuppone che results sia di tipo WorkflowCompilerResults. Questo esempio di codice è parte dell'esempio SDK Outlook Workflow Wizard nel file WizardForm.cs. Per altre informazioni, vedere Procedura guidata flusso di lavoro 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)

Commenti

Nota

In questo materiale vengono descritti tipi e spazi dei nomi obsoleti. Per altre informazioni, vedere Deprecated Types in Windows Workflow Foundation 4.5 (Tipi deprecati in Windows Workflow Foundation 4.5).

Costruttori

WorkflowCompiler()

Inizializza una nuova istanza della classe WorkflowCompiler.

Metodi

Compile(WorkflowCompilerParameters, String[])

Compila un elenco di flussi di lavoro contenuti nei file che vengono passati come parametri basati sulla classe WorkflowCompilerParameters.

Equals(Object)

Determina se l'oggetto specificato è uguale all'oggetto corrente.

(Ereditato da Object)
GetHashCode()

Funge da funzione hash predefinita.

(Ereditato da Object)
GetType()

Ottiene l'oggetto Type dell'istanza corrente.

(Ereditato da Object)
MemberwiseClone()

Crea una copia superficiale dell'oggetto Object corrente.

(Ereditato da Object)
ToString()

Restituisce una stringa che rappresenta l'oggetto corrente.

(Ereditato da Object)

Si applica a