当前位置: 首页>>代码示例>>C#>>正文


C# PackageBuilder.Build方法代码示例

本文整理汇总了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);
        }
开发者ID:Allors,项目名称:apps,代码行数:14,代码来源:PackageTests.cs

示例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();
        }
开发者ID:zooba,项目名称:wix3,代码行数:27,代码来源:BurnTestBase.cs

示例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();
        }
开发者ID:Jeremiahf,项目名称:wix3,代码行数:18,代码来源:WixTestBase.cs

示例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;
        }
开发者ID:Jeremiahf,项目名称:wix3,代码行数:16,代码来源:DependencyExtension.DependencyExtensionTests.cs


注:本文中的PackageBuilder.Build方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。