155 references to BuildEventContext
Microsoft.Build (9)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
349BuildEventContext = 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)
70private static readonly BuildEventContext s_buildEventContext = new BuildEventContext(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Definition\ProjectCollection.cs (2)
387BuildEventContext buildEventContext = new BuildEventContext(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 1264var buildEventContext = new BuildEventContext(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Instance\ProjectInstance.cs (3)
316BuildEventContext buildEventContext = new BuildEventContext(buildParameters.NodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 546BuildEventContext buildEventContext = new BuildEventContext(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 621BuildEventContext buildEventContext = new BuildEventContext(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Microsoft.Build.Engine.UnitTests (105)
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)
60new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))); 77new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4)))); 149new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))); 187new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))); 212new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))); 242new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4)));
BackEnd\LoggingService_Tests.cs (1)
1176BuildEventContext = new BuildEventContext(0, 0, 0, 0),
BackEnd\LoggingServicesLogMethod_Tests.cs (6)
36private static BuildEventContext s_buildEventContext = new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4); 41private static BuildEventContext s_targetBuildEventContext = new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, -1); 874BuildEventContext nodeBuildEventContext = new BuildEventContext(Scheduler.InProcNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 909BuildEventContext nodeBuildEventContext = new BuildEventContext(Scheduler.InProcNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 950BuildEventContext nodeBuildEventContext = new BuildEventContext(NodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 1425new BuildEventContext(1, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId),
BackEnd\MockLoggingService.cs (3)
568return new BuildEventContext(0, 0, 0, 0); 617return new BuildEventContext(0, 0, 0, 0); 655return new BuildEventContext(0, 0, 0, 0);
BackEnd\TaskExecutionHost_Tests.cs (3)
982TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)); 1012TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)); 1243TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1));
BackEnd\TaskRegistry_Tests.cs (3)
71private readonly BuildEventContext _loggerContext = new BuildEventContext(2, 2, 2, 2); 1137InvalidProjectFileException 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)); 2120new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4)));
BuildEventArgsSerialization_Tests.cs (1)
266args.BuildEventContext = new BuildEventContext(4, 5, 6, 7);
ConfigureableForwardingLogger_Tests.cs (1)
52BuildEventContext context = new BuildEventContext(1, 2, 3, 4);
ConsoleLogger_Tests.cs (52)
466es.Consume(new ProjectStartedEventArgs(1, null, null, "p", null, null, null, parentBuildEventContext: new BuildEventContext(1, 1, 1, 1)) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 467es.Consume(new TargetStartedEventArgs(null, null, "t", null, null) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 468es.Consume(new TaskStartedEventArgs(null, null, null, null, "task") { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 469es.Consume(new BuildMessageEventArgs(null, null, null, MessageImportance.High) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 470es.Consume(new BuildWarningEventArgs(null, null, null, 0, 0, 0, 0, null, null, null) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 471es.Consume(new BuildErrorEventArgs(null, null, null, 0, 0, 0, 0, null, null, null) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 472es.Consume(new TaskFinishedEventArgs(null, null, null, null, "task", true) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 473es.Consume(new TargetFinishedEventArgs(null, null, "t", null, null, true) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 474es.Consume(new ProjectFinishedEventArgs(null, null, "p", true) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 475es.Consume(new BuildFinishedEventArgs(null, null, true) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 476es.Consume(new BuildFinishedEventArgs(null, null, true) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 477es.Consume(new BuildFinishedEventArgs(null, null, true) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 478es.Consume(new MyCustomBuildEventArgs2() { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 491BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 608BuildEventContext = new BuildEventContext(1, 2, 3, 4) 664buildEventArgs.BuildEventContext = new BuildEventContext(1, 2, 3, 4); 693BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 699ProjectStartedEventArgs pse = new ProjectStartedEventArgs(1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 1, 1, 1)); 743BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 749ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 2, 3, 4)); 804BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 810ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 2, 3, 4)); 866BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 872ProjectStartedEventArgs pse = new ProjectStartedEventArgs(1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 1, 1, 1)); 919BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 925ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 2, 3, 4)); 979BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 985ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 2, 3, 4)); 1040BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 1046ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 2, 3, 4)); 1099c.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1117c.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1132c.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1155buildEvent.BuildEventContext = new BuildEventContext(1, 2, 3, 4); 1376buildEvent.BuildEventContext = new BuildEventContext(1, 2, 3, 4); 1433buildEvent.BuildEventContext = new BuildEventContext(1, 2, 3, 4); 1453buildEvent.BuildEventContext = new BuildEventContext(1, 2, 3, 4); 1559bwea.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1565beea.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1646bwea.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1652beea.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1728ProjectStartedEventArgs project1Started = new ProjectStartedEventArgs(1, null, null, "p", "t", null, null, new BuildEventContext(BuildEventContext.InvalidNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId)); 1729project1Started.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1757project2Started.BuildEventContext = new BuildEventContext(2, 2, 2, 2); 1842messsage1.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1856messsage2.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1870messsage2.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1902BuildEventContext context = new BuildEventContext(1, 1, 1, 1); 1903BuildEventContext context2 = new BuildEventContext(2, 2, 2, 2); 1932BuildEventContext context = new BuildEventContext(1, 1, 1, 1); 1933BuildEventContext context2 = new BuildEventContext(2, 2, 2, 2);
Construction\SolutionFilter_Tests.cs (1)
30private static readonly BuildEventContext _buildEventContext = new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0);
Construction\SolutionProjectGenerator_Tests.cs (1)
38private static readonly BuildEventContext _buildEventContext = new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0);
Definition\ToolsVersion_Tests.cs (7)
39LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 85LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 105LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 124LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 144LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 168LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 935LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4));
Evaluation\Evaluator_Tests.cs (2)
4500new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))); 4518new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))));
Evaluation\Expander_Tests.cs (4)
107new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))); 856new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))); 2375new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4)))); 2385new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))));
Evaluation\ItemSpec_Tests.cs (1)
96new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4)));
Evaluation\UsedUninitializedProperties_Tests.cs (1)
18PropertiesUseTracker props = new(TestLoggingContext.CreateTestContext(new BuildEventContext(1, 2, 3, 4)));
FileLogger_Tests.cs (8)
69SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 95SetUpFileLoggerAndLogMessage("logfile=||invalid||", new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 122fl.MessageHandler(null, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 224SetUpFileLoggerAndLogMessage("encoding=utf-16;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 251SetUpFileLoggerAndLogMessage("encoding=utf-8;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 301SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 325SetUpFileLoggerAndLogMessage("append;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) }); 350SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) { BuildEventContext = new BuildEventContext(1, 1, 1, 1) });
Instance\ProjectInstance_Internal_Tests.cs (1)
859BuildEventContext buildEventContext = new BuildEventContext(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Telemetry\Telemetry_Tests.cs (1)
495new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4));
TerminalLogger_Tests.cs (1)
723BuildEventContext = new BuildEventContext(1, -1, -1, -1) // context that belongs to no project
Microsoft.Build.Framework (3)
BuildEventArgs.cs (1)
247buildEventContext = new BuildEventContext(nodeId, targetId, projectContextId, taskId);
BuildEventContext.cs (1)
134public static BuildEventContext Invalid { get; } = new BuildEventContext(InvalidNodeId, InvalidTargetId, InvalidProjectContextId, InvalidTaskId);
ProjectStartedEventArgs.cs (1)
435parentProjectBuildEventContext = new BuildEventContext(nodeId, targetId, projectContextId, taskId);
Microsoft.Build.Framework.UnitTests (38)
CustomEventArgSerialization_Tests.cs (36)
62genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 79genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 104newGenericEvent.BuildEventContext = new BuildEventContext(1, 3, 4, 5); 128genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 145genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 179genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 213genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 228genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 261genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 279genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 331messageEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 348messageEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 384criticalMessageEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 402criticalMessageEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 438genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 455genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 489genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 523genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 541genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 589ProjectStartedEventArgs genericEvent = new ProjectStartedEventArgs(8, "Message", "HelpKeyword", "ProjectFile", null, propertyList, null, new BuildEventContext(7, 8, 9, 10)); 590genericEvent.BuildEventContext = new BuildEventContext(7, 8, 9, 10); 653ProjectStartedEventArgs genericEvent = new ProjectStartedEventArgs(8, "Message", "HelpKeyword", "ProjectFile", null, null, null, new BuildEventContext(7, 8, 9, 10)); 654genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 671genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 721genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 739genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 787genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 804genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 851genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 868genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 916genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 934genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 984genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 997genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 1014genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2); 1027genericEvent.BuildEventContext = new BuildEventContext(5, 4, 3, 2);
EventArgs_Tests.cs (1)
32s_baseGenericEvent.BuildEventContext = new BuildEventContext(9, 8, 7, 6);
ProjectStartedEventArgs_Tests.cs (1)
24BuildEventContext parentBuildEventContext = new BuildEventContext(2, 3, 4, 5);