WorkflowCompilerParameters 类

定义

注意

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

表示在编译过程中传递到 WorkflowCompiler 的参数。

public ref class WorkflowCompilerParameters sealed : System::CodeDom::Compiler::CompilerParameters
[System.Serializable]
public sealed class WorkflowCompilerParameters : System.CodeDom.Compiler.CompilerParameters
[System.Serializable]
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class WorkflowCompilerParameters : System.CodeDom.Compiler.CompilerParameters
[<System.Serializable>]
type WorkflowCompilerParameters = class
    inherit CompilerParameters
[<System.Serializable>]
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type WorkflowCompilerParameters = class
    inherit CompilerParameters
Public NotInheritable Class WorkflowCompilerParameters
Inherits CompilerParameters
继承
WorkflowCompilerParameters
属性

示例

下面的代码示例演示如何创建 WorkflowCompilerParameters 类的新实例、添加 LibraryPaths 和设置 CompilerParameters.OutputAssembly 属性的值。 代码还创建 WorkflowCompiler 类的新实例,并运行 WorkflowCompiler.Compile 方法。 此代码假定 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 中弃用的类型

构造函数

WorkflowCompilerParameters()

初始化 WorkflowCompilerParameters 类的新实例。

WorkflowCompilerParameters(String[])

用编译中使用的程序集的名称初始化 WorkflowCompilerParameters 类的新实例。

WorkflowCompilerParameters(String[], String)

用编译中使用的程序集的名称和应用于输出文件的名称来初始化 WorkflowCompilerParameters 类的新实例。

WorkflowCompilerParameters(String[], String, Boolean)

用编译中使用的程序集的名称、应用于输出文件的名称和用于包含调试信息的指示符来初始化 WorkflowCompilerParameters 类的新实例。

WorkflowCompilerParameters(WorkflowCompilerParameters)

从现有实例初始化 WorkflowCompilerParameters 类的新实例。

属性

CompilerOptions

获取或设置包含此编译的命令行选项的字符串。

CoreAssemblyFileName

获取或设置包含基类类型(如 ObjectStringInt32)的核心或标准程序集的名称。

(继承自 CompilerParameters)
EmbeddedResources

获取要在编译程序集输出时包含的 .NET 资源文件。

(继承自 CompilerParameters)
Evidence
已过时。

指定一个证据对象,该对象表示要授予已编译的程序集的安全策略权限。

(继承自 CompilerParameters)
GenerateCodeCompileUnitOnly

获取或设置一个值,该值指示是只生成一个 CodeCompileUnit,还是调用 C# 或 Visual Basic 编译器来生成可执行文件或 DLL。

GenerateExecutable

获取或设置一个值,该值指示是否生成可执行文件。

(继承自 CompilerParameters)
GenerateInMemory

获取或设置一个值,该值指示是否在内存中生成输出。

(继承自 CompilerParameters)
IncludeDebugInformation

获取或设置一个值,该值指示是否在已编译的可执行文件中包含调试信息。

(继承自 CompilerParameters)
LanguageToUse

获取或设置一个字符串,该字符串包含在编译 CodeCompileUnit 中要使用的语言。

LibraryPaths

获取表示编译器在其下查找引用程序集的目录名集合的属性。

LinkedResources

获取当前源中引用的 .NET 资源文件。

(继承自 CompilerParameters)
MainClass

获取或设置主类的名称。

(继承自 CompilerParameters)
OutputAssembly

获取或设置输出程序集的名称。

(继承自 CompilerParameters)
ReferencedAssemblies

获取当前项目所引用的程序集。

(继承自 CompilerParameters)
TempFiles

获取或设置包含临时文件的集合。

(继承自 CompilerParameters)
TreatWarningsAsErrors

获取或设置一个值,该值指示是否将警告视为错误。

(继承自 CompilerParameters)
UserCodeCompileUnits

获取或设置将在调用工作流编译器时使用的代码编译单元的集合。

UserToken

获取或设置在创建编译器进程时使用的用户标记。

(继承自 CompilerParameters)
WarningLevel

获取或设置使编译器中止编译的警告等级。

(继承自 CompilerParameters)
Win32Resource

获取或设置要链接到已编译程序集中的 Win32 资源文件的文件名。

(继承自 CompilerParameters)

方法

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()

返回表示当前对象的字符串。

(继承自 Object)

适用于