本文整理汇总了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);
}
示例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);
}
示例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);
}
);
}
示例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);
}
示例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);
}
);
}