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


C# BuildResult.MergeResults方法代码示例

本文整理汇总了C#中Microsoft.Build.Execution.BuildResult.MergeResults方法的典型用法代码示例。如果您正苦于以下问题:C# BuildResult.MergeResults方法的具体用法?C# BuildResult.MergeResults怎么用?C# BuildResult.MergeResults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.Build.Execution.BuildResult的用法示例。


在下文中一共展示了BuildResult.MergeResults方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestMergeResultsBad3

        public void TestMergeResultsBad3()
        {
            BuildRequest request = CreateNewBuildRequest(1, new string[0]);
            BuildResult result = new BuildResult(request);
            result.AddResultsForTarget("foo", TestUtilities.GetEmptySucceedingTargetResult());

            BuildRequest request2 = CreateNewBuildRequest(2, new string[0]);
            BuildResult result2 = new BuildResult(request2);
            result2.AddResultsForTarget("bar", TestUtilities.GetEmptySucceedingTargetResult());

            result.MergeResults(result2);
        }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:12,代码来源:BuildResult_Tests.cs

示例2: TestMergeResultsBad2

        public void TestMergeResultsBad2()
        {
            BuildResult result = new BuildResult(1);
            result["foo"] = new TargetResult(new BuildItem[0] { }, BuildResultCode.Success);

            BuildResult result2 = new BuildResult(1);
            result2["foo"] = new TargetResult(new BuildItem[0] { }, BuildResultCode.Success);

            result.MergeResults(result2);
        }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:10,代码来源:BuildResult_Tests.cs

示例3: TestMergeResultsBad3

        public void TestMergeResultsBad3()
        {
            Assert.Throws<InternalErrorException>(() =>
            {
                BuildRequest request = CreateNewBuildRequest(1, new string[0]);
                BuildResult result = new BuildResult(request);
                result.AddResultsForTarget("foo", TestUtilities.GetEmptySucceedingTargetResult());

                BuildRequest request2 = CreateNewBuildRequest(2, new string[0]);
                BuildResult result2 = new BuildResult(request2);
                result2.AddResultsForTarget("bar", TestUtilities.GetEmptySucceedingTargetResult());

                result.MergeResults(result2);
            }
           );
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:16,代码来源:BuildResult_Tests.cs

示例4: TestMergeResults

        public void TestMergeResults()
        {
            BuildRequest request = CreateNewBuildRequest(1, new string[0]);
            BuildResult result = new BuildResult(request);
            result.AddResultsForTarget("foo", TestUtilities.GetEmptySucceedingTargetResult());

            BuildResult result2 = new BuildResult(request);
            result.AddResultsForTarget("bar", TestUtilities.GetEmptyFailingTargetResult());

            result.MergeResults(result2);
            Assert.AreEqual(TargetResultCode.Success, result["foo"].ResultCode);
            Assert.AreEqual(TargetResultCode.Failure, result["bar"].ResultCode);

            BuildResult result3 = new BuildResult(request);
            result.MergeResults(result3);

            BuildResult result4 = new BuildResult(request);
            result4.AddResultsForTarget("xor", TestUtilities.GetEmptySucceedingTargetResult());
            result.MergeResults(result4);
            Assert.AreEqual(TargetResultCode.Success, result["foo"].ResultCode);
            Assert.AreEqual(TargetResultCode.Failure, result["bar"].ResultCode);
            Assert.AreEqual(TargetResultCode.Success, result["xor"].ResultCode);
        }
开发者ID:JamesLinus,项目名称:msbuild,代码行数:23,代码来源:BuildResult_Tests.cs

示例5: TestMergeResultsBad1

        public void TestMergeResultsBad1()
        {
            Assert.Throws<ArgumentNullException>(() =>
            {
                BuildRequest request = CreateNewBuildRequest(1, new string[0]);
                BuildResult result = new BuildResult(request);
                result.AddResultsForTarget("foo", TestUtilities.GetEmptySucceedingTargetResult());

                result.MergeResults(null);
            }
           );
        }
开发者ID:cameron314,项目名称:msbuild,代码行数:12,代码来源:BuildResult_Tests.cs


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