本文整理汇总了C#中PackageBuilder.Build方法的典型用法代码示例。如果您正苦于以下问题:C# PackageBuilder.Build方法的具体用法?C# PackageBuilder.Build怎么用?C# PackageBuilder.Build使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PackageBuilder
的用法示例。
在下文中一共展示了PackageBuilder.Build方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GivenPackage_WhenDeriving_ThenRequiredRelationsMustExist
public void GivenPackage_WhenDeriving_ThenRequiredRelationsMustExist()
{
var builder = new PackageBuilder(this.DatabaseSession);
var package = builder.Build();
Assert.IsTrue(this.DatabaseSession.Derive().HasErrors);
this.DatabaseSession.Rollback();
builder.WithName("package");
package = builder.Build();
Assert.IsFalse(this.DatabaseSession.Derive().HasErrors);
}
示例2: CreatePackage
/// <summary>
/// Creates an instance of a <see cref="PackageBuilder"/>.
/// </summary>
/// <param name="name">The name of the package to create.</param>
/// <param name="bindPaths">Additional bind paths for building the package.</param>
/// <param name="preprocessorVariables">Preprocessor variables for building the package.</param>
/// <param name="extensions">Extensions for building the package.</param>
/// <returns>A new <see cref="PackageBuilder"/> initialized with the given data.</returns>
protected PackageBuilder CreatePackage(string name, Dictionary<string, string> bindPaths = null, Dictionary<string, string> preprocessorVariables = null, string[] extensions = null)
{
string testDataDirectory = Path.Combine(this.TestContext.TestDataDirectory, @"Integration\BurnIntegrationTests\BasicTests");
PackageBuilder builder = new PackageBuilder(this.TestContext.TestName, name, testDataDirectory, this.TestArtifacts);
if (null != bindPaths)
{
builder.BindPaths = bindPaths;
}
if (null != preprocessorVariables)
{
builder.PreprocessorVariables = preprocessorVariables;
}
builder.Extensions = extensions ?? WixTestBase.Extensions;
return builder.Build();
}
示例3: CreatePackage
protected PackageBuilder CreatePackage(string name, Dictionary<string, string> bindPaths = null, Dictionary<string, string> preprocessorVariables = null, string[] extensions = null)
{
PackageBuilder builder = new PackageBuilder(this.TestContext.TestName, name, this.TestContext.TestDataDirectory, this.TestContext.TestArtifacts);
if (null != bindPaths)
{
builder.BindPaths = bindPaths;
}
if (null != preprocessorVariables)
{
builder.PreprocessorVariables = preprocessorVariables;
}
builder.Extensions = null == extensions ? WixTestBase.Extensions : extensions;
return builder.Build();
}
示例4: BuildPackage
/// <summary>
/// Passes in per-test data to avoid collisions with failed tests when installing dependencies.
/// </summary>
/// <param name="name">The name of the source file (sans extension) to build.</param>
/// <param name="version">The optional version to pass to the compiler.</param>
/// <returns>The path to the build MSI package.</returns>
private string BuildPackage(string name, string version)
{
PackageBuilder builder = new PackageBuilder(this.TestContext.TestName, name, this.TestDirectory, this.TestArtifacts) { Extensions = DependencyExtensionTests.Extensions };
if (!String.IsNullOrEmpty(version))
{
builder.PreprocessorVariables.Add("Version", version);
}
return builder.Build().Output;
}