1 write to _taskHost
Microsoft.Build.Engine.UnitTests (1)
BackEnd\TaskHost_Tests.cs (1)
87
_taskHost
= new TaskHost(_mockHost, entry, _elementLocation, null /*Don't care about the callback either unless doing a build*/);
52 references to _taskHost
Microsoft.Build.Engine.UnitTests (52)
BackEnd\TaskHost_Tests.cs (52)
88
_taskHost
.LoggingContext = new TaskLoggingContext(_loggingService, BuildEventContext.Invalid);
101
_taskHost
.BuildProjectFile("ProjectFile", new string[] { "Build" }, projectProperties, targetOutputs);
130
_taskHost
.LogErrorEvent(customBuildError);
155
_taskHost
.LogWarningEvent(customBuildWarning);
180
_taskHost
.LogMessageEvent(customMessage);
196
_taskHost
.ContinueOnError = false;
198
_taskHost
.LogErrorEvent(new BuildErrorEventArgs("SubCategory", "code", null, 0, 1, 2, 3, "message", "Help", "Sender"));
204
_taskHost
.ContinueOnError = true;
205
_taskHost
.ConvertErrorsToWarnings = true;
210
_taskHost
.LogErrorEvent(new BuildErrorEventArgs("SubCategory", "code", null, 0, 1, 2, 3, "message", "Help", "Sender"));
216
_taskHost
.ContinueOnError = true;
217
_taskHost
.ConvertErrorsToWarnings = false;
223
_taskHost
.LogErrorEvent(new BuildErrorEventArgs("SubCategory", "code", null, 0, 1, 2, 3, "message", "Help", "Sender"));
238
_taskHost
.LogErrorEvent(null);
249
_taskHost
.LogWarningEvent(null);
260
_taskHost
.LogMessageEvent(null);
271
_taskHost
.LogCustomEvent(null);
281
_taskHost
.LogErrorEvent(new BuildErrorEventArgs("SubCategory", "code", null, 0, 1, 2, 3, "message", "Help", "Sender"));
295
_taskHost
.LogWarningEvent(new BuildWarningEventArgs("SubCategory", "code", null, 0, 1, 2, 3, "message", "Help", "Sender"));
309
_taskHost
.LogMessageEvent(new BuildMessageEventArgs("message", "HelpKeyword", "senderName", MessageImportance.High));
323
_taskHost
.LogCustomEvent(new MyCustomBuildEventArgs("testCustomBuildEvent"));
339
_taskHost
.LogErrorEvent(new MyCustomBuildErrorEventArgsNotSerializable("SubCategory"));
353
_taskHost
.LogWarningEvent(new MyCustomBuildWarningEventArgsNotSerializable("SubCategory"));
367
_taskHost
.LogMessageEvent(new MyCustomMessageEventNotSerializable("message"));
381
_taskHost
.LogCustomEvent(new MyCustomBuildEventArgsNotSerializable("testCustomBuildEvent"));
397
_taskHost
.LogCustomEvent(new ExtendedCustomBuildEventArgs("testExtCustomBuildEvent", "ext message", null, null));
410
_taskHost
.LogErrorEvent(new ExtendedBuildErrorEventArgs("testExtCustomBuildError", null, null, null, 0, 0, 0, 0, "ext err message", null, null));
423
_taskHost
.LogWarningEvent(new ExtendedBuildWarningEventArgs("testExtCustomBuildWarning", null, null, null, 0, 0, 0, 0, "ext warn message", null, null));
436
_taskHost
.LogMessageEvent(new ExtendedBuildMessageEventArgs("testExtCustomBuildMessage", "ext message", null, null, MessageImportance.Normal));
452
Assert.True(
_taskHost
.IsRunningMultipleNodes);
455
_taskHost
.LogErrorEvent(e);
473
_taskHost
.LogWarningEvent(e);
474
Assert.True(
_taskHost
.IsRunningMultipleNodes);
492
_taskHost
.LogMessageEvent(e);
493
Assert.True(
_taskHost
.IsRunningMultipleNodes);
512
_taskHost
.LogCustomEvent(e);
513
Assert.True(
_taskHost
.IsRunningMultipleNodes);
531
Assert.False(
_taskHost
.IsRunningMultipleNodes); // "Expect IsRunningMultipleNodes to be false with 1 node"
541
Assert.True(
_taskHost
.IsRunningMultipleNodes); // "Expect IsRunningMultipleNodes to be true with 4 nodes"
767
_taskHost
.RequestCores(0);
772
_taskHost
.RequestCores(-1);
781
_taskHost
.RequestCores(3).ShouldBe(1);
791
_taskHost
.RequestCores(3).ShouldBe(2);
797
_taskHost
.RequestCores(3).ShouldBe(1);
807
_taskHost
.ReleaseCores(0);
812
_taskHost
.ReleaseCores(-1);
820
_taskHost
.RequestCores(3).ShouldBe(2);
823
_taskHost
.ReleaseCores(1);
827
_taskHost
.RequestCores(1);
835
_taskHost
.RequestCores(3).ShouldBe(2);
838
_taskHost
.ReleaseCores(2);
842
_taskHost
.RequestCores(1);