154 references to BuildEventContext
Microsoft.Build (9)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
359
BuildEventContext = new
BuildEventContext
(nodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId)
BackEnd\Components\Logging\NodeLoggingContext.cs (1)
25
: base(loggingService, new
BuildEventContext
(nodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId), inProcNode)
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (1)
183
?? new
BuildEventContext
(
Definition\Project.cs (1)
70
private static readonly BuildEventContext s_buildEventContext = new
BuildEventContext
(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Definition\ProjectCollection.cs (2)
387
BuildEventContext buildEventContext = new
BuildEventContext
(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
1264
var buildEventContext = new
BuildEventContext
(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Instance\ProjectInstance.cs (3)
316
BuildEventContext buildEventContext = new
BuildEventContext
(buildParameters.NodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
546
BuildEventContext buildEventContext = new
BuildEventContext
(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
621
BuildEventContext buildEventContext = new
BuildEventContext
(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Microsoft.Build.Engine.UnitTests (104)
BackEnd\AssemblyTaskFactory_Tests.cs (1)
799
_loadedType = _taskFactory.InitializeFactory(_loadInfo, "TaskToTestFactories", new Dictionary<string, TaskPropertyInfo>(), string.Empty, factoryParameters, explicitlyLaunchTaskHost, new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)), ElementLocation.Create("NONE"), String.Empty);
BackEnd\BatchingEngine_Tests.cs (6)
60
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)));
77
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4))));
149
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)));
187
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)));
212
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)));
242
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)));
BackEnd\LoggingServicesLogMethod_Tests.cs (6)
36
private static BuildEventContext s_buildEventContext = new
BuildEventContext
(1, 2, BuildEventContext.InvalidProjectContextId, 4);
41
private static BuildEventContext s_targetBuildEventContext = new
BuildEventContext
(1, 2, BuildEventContext.InvalidProjectContextId, -1);
874
BuildEventContext nodeBuildEventContext = new
BuildEventContext
(Scheduler.InProcNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
909
BuildEventContext nodeBuildEventContext = new
BuildEventContext
(Scheduler.InProcNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
950
BuildEventContext nodeBuildEventContext = new
BuildEventContext
(NodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
1425
new
BuildEventContext
(1, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId),
BackEnd\MockLoggingService.cs (3)
568
return new
BuildEventContext
(0, 0, 0, 0);
617
return new
BuildEventContext
(0, 0, 0, 0);
655
return new
BuildEventContext
(0, 0, 0, 0);
BackEnd\TaskExecutionHost_Tests.cs (3)
982
TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new
BuildEventContext
(1, 1, BuildEventContext.InvalidProjectContextId, 1));
1012
TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new
BuildEventContext
(1, 1, BuildEventContext.InvalidProjectContextId, 1));
1243
TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new
BuildEventContext
(1, 1, BuildEventContext.InvalidProjectContextId, 1));
BackEnd\TaskRegistry_Tests.cs (3)
71
private readonly BuildEventContext _loggerContext = new
BuildEventContext
(2, 2, 2, 2);
1137
InvalidProjectFileException exception = Should.Throw<InvalidProjectFileException>(() => registry.GetRegisteredTask("Task1", "none", TaskHostParameters.Empty, false, new TargetLoggingContext(_loggingService, new
BuildEventContext
(1, 1, BuildEventContext.InvalidProjectContextId, 1)), ElementLocation.Create("none", 1, 2), false));
2120
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)));
BuildEventArgsSerialization_Tests.cs (1)
266
args.BuildEventContext = new
BuildEventContext
(4, 5, 6, 7);
ConfigureableForwardingLogger_Tests.cs (1)
52
BuildEventContext context = new
BuildEventContext
(1, 2, 3, 4);
ConsoleLogger_Tests.cs (52)
460
es.Consume(new ProjectStartedEventArgs(1, null, null, "p", null, null, null, parentBuildEventContext: new
BuildEventContext
(1, 1, 1, 1)) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
461
es.Consume(new TargetStartedEventArgs(null, null, "t", null, null) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
462
es.Consume(new TaskStartedEventArgs(null, null, null, null, "task") { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
463
es.Consume(new BuildMessageEventArgs(null, null, null, MessageImportance.High) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
464
es.Consume(new BuildWarningEventArgs(null, null, null, 0, 0, 0, 0, null, null, null) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
465
es.Consume(new BuildErrorEventArgs(null, null, null, 0, 0, 0, 0, null, null, null) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
466
es.Consume(new TaskFinishedEventArgs(null, null, null, null, "task", true) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
467
es.Consume(new TargetFinishedEventArgs(null, null, "t", null, null, true) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
468
es.Consume(new ProjectFinishedEventArgs(null, null, "p", true) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
469
es.Consume(new BuildFinishedEventArgs(null, null, true) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
470
es.Consume(new BuildFinishedEventArgs(null, null, true) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
471
es.Consume(new BuildFinishedEventArgs(null, null, true) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
472
es.Consume(new MyCustomBuildEventArgs2() { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
485
BuildEventContext buildEventContext = new
BuildEventContext
(1, 2, 3, 4);
602
BuildEventContext = new
BuildEventContext
(1, 2, 3, 4)
658
buildEventArgs.BuildEventContext = new
BuildEventContext
(1, 2, 3, 4);
687
BuildEventContext buildEventContext = new
BuildEventContext
(1, 2, 3, 4);
693
ProjectStartedEventArgs pse = new ProjectStartedEventArgs(1, "ps", null, "fname", "", null, null, new
BuildEventContext
(1, 1, 1, 1));
737
BuildEventContext buildEventContext = new
BuildEventContext
(1, 2, 3, 4);
743
ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new
BuildEventContext
(1, 2, 3, 4));
798
BuildEventContext buildEventContext = new
BuildEventContext
(1, 2, 3, 4);
804
ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new
BuildEventContext
(1, 2, 3, 4));
860
BuildEventContext buildEventContext = new
BuildEventContext
(1, 2, 3, 4);
866
ProjectStartedEventArgs pse = new ProjectStartedEventArgs(1, "ps", null, "fname", "", null, null, new
BuildEventContext
(1, 1, 1, 1));
913
BuildEventContext buildEventContext = new
BuildEventContext
(1, 2, 3, 4);
919
ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new
BuildEventContext
(1, 2, 3, 4));
973
BuildEventContext buildEventContext = new
BuildEventContext
(1, 2, 3, 4);
979
ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new
BuildEventContext
(1, 2, 3, 4));
1034
BuildEventContext buildEventContext = new
BuildEventContext
(1, 2, 3, 4);
1040
ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new
BuildEventContext
(1, 2, 3, 4));
1093
c.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1111
c.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1126
c.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1149
buildEvent.BuildEventContext = new
BuildEventContext
(1, 2, 3, 4);
1370
buildEvent.BuildEventContext = new
BuildEventContext
(1, 2, 3, 4);
1427
buildEvent.BuildEventContext = new
BuildEventContext
(1, 2, 3, 4);
1447
buildEvent.BuildEventContext = new
BuildEventContext
(1, 2, 3, 4);
1553
bwea.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1559
beea.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1640
bwea.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1646
beea.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1722
ProjectStartedEventArgs project1Started = new ProjectStartedEventArgs(1, null, null, "p", "t", null, null, new
BuildEventContext
(BuildEventContext.InvalidNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId));
1723
project1Started.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1751
project2Started.BuildEventContext = new
BuildEventContext
(2, 2, 2, 2);
1836
messsage1.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1850
messsage2.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1864
messsage2.BuildEventContext = new
BuildEventContext
(1, 1, 1, 1);
1896
BuildEventContext context = new
BuildEventContext
(1, 1, 1, 1);
1897
BuildEventContext context2 = new
BuildEventContext
(2, 2, 2, 2);
1926
BuildEventContext context = new
BuildEventContext
(1, 1, 1, 1);
1927
BuildEventContext context2 = new
BuildEventContext
(2, 2, 2, 2);
Construction\SolutionFilter_Tests.cs (1)
30
private static readonly BuildEventContext _buildEventContext = new
BuildEventContext
(0, 0, BuildEventContext.InvalidProjectContextId, 0);
Construction\SolutionProjectGenerator_Tests.cs (1)
38
private static readonly BuildEventContext _buildEventContext = new
BuildEventContext
(0, 0, BuildEventContext.InvalidProjectContextId, 0);
Definition\ToolsVersion_Tests.cs (7)
38
LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new
BuildEventContext
(1, 2, BuildEventContext.InvalidProjectContextId, 4));
84
LoggingContext loggingContext = new TestLoggingContext(service, new
BuildEventContext
(1, 2, BuildEventContext.InvalidProjectContextId, 4));
104
LoggingContext loggingContext = new TestLoggingContext(service, new
BuildEventContext
(1, 2, BuildEventContext.InvalidProjectContextId, 4));
123
LoggingContext loggingContext = new TestLoggingContext(service, new
BuildEventContext
(1, 2, BuildEventContext.InvalidProjectContextId, 4));
143
LoggingContext loggingContext = new TestLoggingContext(service, new
BuildEventContext
(1, 2, BuildEventContext.InvalidProjectContextId, 4));
167
LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new
BuildEventContext
(1, 2, BuildEventContext.InvalidProjectContextId, 4));
934
LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new
BuildEventContext
(1, 2, BuildEventContext.InvalidProjectContextId, 4));
Evaluation\Evaluator_Tests.cs (2)
4500
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)));
4518
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4))));
Evaluation\Expander_Tests.cs (4)
107
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)));
856
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)));
2375
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4))));
2385
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4))));
Evaluation\ItemSpec_Tests.cs (1)
96
new TestLoggingContext(null!, new
BuildEventContext
(1, 2, 3, 4)));
Evaluation\UsedUninitializedProperties_Tests.cs (1)
18
PropertiesUseTracker props = new(TestLoggingContext.CreateTestContext(new
BuildEventContext
(1, 2, 3, 4)));
FileLogger_Tests.cs (8)
61
SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
87
SetUpFileLoggerAndLogMessage("logfile=||invalid||", new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
114
fl.MessageHandler(null, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
216
SetUpFileLoggerAndLogMessage("encoding=utf-16;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
243
SetUpFileLoggerAndLogMessage("encoding=utf-8;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
293
SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
317
SetUpFileLoggerAndLogMessage("append;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
342
SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new
BuildEventContext
(1, 1, 1, 1) });
Instance\ProjectInstance_Internal_Tests.cs (1)
859
BuildEventContext buildEventContext = new
BuildEventContext
(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Telemetry\Telemetry_Tests.cs (1)
495
new
BuildEventContext
(1, 2, BuildEventContext.InvalidProjectContextId, 4));
TerminalLogger_Tests.cs (1)
723
BuildEventContext = new
BuildEventContext
(1, -1, -1, -1) // context that belongs to no project
Microsoft.Build.Framework (3)
BuildEventArgs.cs (1)
247
buildEventContext = new
BuildEventContext
(nodeId, targetId, projectContextId, taskId);
BuildEventContext.cs (1)
134
public static BuildEventContext Invalid { get; } = new
BuildEventContext
(InvalidNodeId, InvalidTargetId, InvalidProjectContextId, InvalidTaskId);
ProjectStartedEventArgs.cs (1)
435
parentProjectBuildEventContext = new
BuildEventContext
(nodeId, targetId, projectContextId, taskId);
Microsoft.Build.Framework.UnitTests (38)
CustomEventArgSerialization_Tests.cs (36)
62
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
79
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
104
newGenericEvent.BuildEventContext = new
BuildEventContext
(1, 3, 4, 5);
128
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
145
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
179
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
213
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
228
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
261
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
279
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
331
messageEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
348
messageEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
384
criticalMessageEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
402
criticalMessageEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
438
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
455
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
489
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
523
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
541
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
589
ProjectStartedEventArgs genericEvent = new ProjectStartedEventArgs(8, "Message", "HelpKeyword", "ProjectFile", null, propertyList, null, new
BuildEventContext
(7, 8, 9, 10));
590
genericEvent.BuildEventContext = new
BuildEventContext
(7, 8, 9, 10);
653
ProjectStartedEventArgs genericEvent = new ProjectStartedEventArgs(8, "Message", "HelpKeyword", "ProjectFile", null, null, null, new
BuildEventContext
(7, 8, 9, 10));
654
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
671
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
721
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
739
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
787
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
804
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
851
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
868
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
916
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
934
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
984
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
997
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
1014
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
1027
genericEvent.BuildEventContext = new
BuildEventContext
(5, 4, 3, 2);
EventArgs_Tests.cs (1)
32
s_baseGenericEvent.BuildEventContext = new
BuildEventContext
(9, 8, 7, 6);
ProjectStartedEventArgs_Tests.cs (1)
24
BuildEventContext parentBuildEventContext = new
BuildEventContext
(2, 3, 4, 5);