Share via


WorkflowCompilerParameters.LibraryPaths 属性

定义

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

public:
 property System::Collections::Specialized::StringCollection ^ LibraryPaths { System::Collections::Specialized::StringCollection ^ get(); };
public System.Collections.Specialized.StringCollection LibraryPaths { get; }
member this.LibraryPaths : System.Collections.Specialized.StringCollection
Public ReadOnly Property LibraryPaths As StringCollection

属性值

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

示例

下面的代码示例演示如何创建 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)

注解

编译器将标准库路径添加到集合中。

适用于