WorkflowCompilerParameters 类

定义

注意

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

表示在编译过程中传递到 WorkflowCompiler 的参数。Represents parameters passed to WorkflowCompiler during the compilation process.

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 属性的值。The following code example demonstrates how to create a new instance of the WorkflowCompilerParameters class, add LibraryPaths and set the value for the CompilerParameters.OutputAssembly property. 代码还创建 WorkflowCompiler 类的新实例,并运行 WorkflowCompiler.Compile 方法。The code also creates a new instance of the WorkflowCompiler class and runs the WorkflowCompiler.Compile method. 此代码假定 results 的类型为 WorkflowCompilerResultsThis code assumes that results is of type WorkflowCompilerResults. 此代码示例摘自 WizardForm.cs 文件中的 Outlook 工作流向导 SDK 示例。This code example is part of the Outlook Workflow Wizard SDK Sample from the WizardForm.cs file. 有关详细信息,请参阅 Outlook 工作流向导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)

注解

备注

本材料讨论的类型和命名空间已废弃不用。This material discusses types and namespaces that are obsolete. 有关详细信息,请参阅 Windows Workflow Foundation 4.5 中弃用的类型For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

构造函数

WorkflowCompilerParameters()

初始化 WorkflowCompilerParameters 类的新实例。Initializes a new instance of the WorkflowCompilerParameters class.

WorkflowCompilerParameters(String[])

用编译中使用的程序集的名称初始化 WorkflowCompilerParameters 类的新实例。Initializes a new instance of the WorkflowCompilerParameters class, with the names of the assemblies used in compilation.

WorkflowCompilerParameters(String[], String)

用编译中使用的程序集的名称和应用于输出文件的名称来初始化 WorkflowCompilerParameters 类的新实例。Initializes a new instance of the WorkflowCompilerParameters class, with the names of the assemblies used in compilation, and the name to apply to the output file.

WorkflowCompilerParameters(String[], String, Boolean)

用编译中使用的程序集的名称、应用于输出文件的名称和用于包含调试信息的指示符来初始化 WorkflowCompilerParameters 类的新实例。Initializes a new instance of the WorkflowCompilerParameters class, with the names of the assemblies used in compilation, and the name to apply to the output file, and the designator for inclusion of debug information.

WorkflowCompilerParameters(WorkflowCompilerParameters)

从现有实例初始化 WorkflowCompilerParameters 类的新实例。Initializes a new instance of the WorkflowCompilerParameters class from an existing instance.

属性

CompilerOptions

获取或设置包含此编译的命令行选项的字符串。Gets or sets a string that contains command-line options for this compilation.

CoreAssemblyFileName

获取或设置包含基类类型(如 ObjectStringInt32)的核心或标准程序集的名称。Gets or sets the name of the core or standard assembly that contains basic types such as Object, String, or Int32.

(继承自 CompilerParameters)
EmbeddedResources

获取要在编译程序集输出时包含的 .NET 资源文件。Gets the .NET resource files to include when compiling the assembly output.

(继承自 CompilerParameters)
Evidence
已过时。

指定一个证据对象,该对象表示要授予已编译的程序集的安全策略权限。Specifies an evidence object that represents the security policy permissions to grant the compiled assembly.

(继承自 CompilerParameters)
GenerateCodeCompileUnitOnly

获取或设置一个值,该值指示是只生成一个 CodeCompileUnit,还是调用 C# 或 Visual Basic 编译器来生成可执行文件或 DLL。Gets or sets a value which indicates whether to generate only a CodeCompileUnit, or to call the C# or Visual Basic compiler to generate the executable or DLL.

GenerateExecutable

获取或设置一个值,该值指示是否生成可执行文件。Gets or sets a value indicating whether to generate an executable.

(继承自 CompilerParameters)
GenerateInMemory

获取或设置一个值,该值指示是否在内存中生成输出。Gets or sets a value indicating whether to generate the output in memory.

(继承自 CompilerParameters)
IncludeDebugInformation

获取或设置一个值,该值指示是否在已编译的可执行文件中包含调试信息。Gets or sets a value indicating whether to include debug information in the compiled executable.

(继承自 CompilerParameters)
LanguageToUse

获取或设置一个字符串,该字符串包含在编译 CodeCompileUnit 中要使用的语言。Gets or sets a string which contains the language to use in compilation of the CodeCompileUnit.

LibraryPaths

获取表示编译器在其下查找引用程序集的目录名集合的属性。Gets the property that represents a collection of directory names under which compiler looks for referenced assemblies.

LinkedResources

获取当前源中引用的 .NET 资源文件。Gets the .NET resource files that are referenced in the current source.

(继承自 CompilerParameters)
MainClass

获取或设置主类的名称。Gets or sets the name of the main class.

(继承自 CompilerParameters)
OutputAssembly

获取或设置输出程序集的名称。Gets or sets the name of the output assembly.

(继承自 CompilerParameters)
ReferencedAssemblies

获取当前项目所引用的程序集。Gets the assemblies referenced by the current project.

(继承自 CompilerParameters)
TempFiles

获取或设置包含临时文件的集合。Gets or sets the collection that contains the temporary files.

(继承自 CompilerParameters)
TreatWarningsAsErrors

获取或设置一个值,该值指示是否将警告视为错误。Gets or sets a value indicating whether to treat warnings as errors.

(继承自 CompilerParameters)
UserCodeCompileUnits

获取或设置将在调用工作流编译器时使用的代码编译单元的集合。Gets or sets the collection of code compile units which will be used in this invocation of the workflow compiler.

UserToken

获取或设置在创建编译器进程时使用的用户标记。Gets or sets the user token to use when creating the compiler process.

(继承自 CompilerParameters)
WarningLevel

获取或设置使编译器中止编译的警告等级。Gets or sets the warning level at which the compiler aborts compilation.

(继承自 CompilerParameters)
Win32Resource

获取或设置要链接到已编译程序集中的 Win32 资源文件的文件名。Gets or sets the file name of a Win32 resource file to link into the compiled assembly.

(继承自 CompilerParameters)

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于