194 instantiations of BuildEventContext
Microsoft.Build (30)
BackEnd\BuildManager\BuildManager.cs (9)
1389BuildEventContext buildEventContext = new BuildEventContext( 1483buildEventContext = new BuildEventContext(request.SubmissionId, 0, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 1745BuildEventContext buildEventContext = new BuildEventContext(submission.SubmissionId, 1, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 1854BuildEventContext projectBuildEventContext = new BuildEventContext(submission.SubmissionId, 1, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 1870var buildEventContext = new BuildEventContext(submission.SubmissionId, 1, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 1924new BuildEventContext( 2453: new BuildEventContext(result.SubmissionId, node, configuration.Project?.EvaluationId ?? BuildEventContext.InvalidEvaluationId, configuration.ConfigurationId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 2492BuildEventContext buildEventContext = new BuildEventContext(submission.SubmissionId, BuildEventContext.InvalidNodeId, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 2648BuildEventContext buildEventContext = new BuildEventContext(0, Scheduler.VirtualNode, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId);
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
292BuildEventContext = new BuildEventContext(nodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId)
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (5)
405=> new BuildEventContext(submissionId, nodeId, NextEvaluationId, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 423return new BuildEventContext(submissionId, nodeId, evaluationId, projectInstanceId, projectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 572BuildEventContext projectBuildEventContext = new BuildEventContext(submissionId, nodeBuildEventContext.NodeId, evaluationId, configurationId, projectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 639BuildEventContext targetBuildEventContext = new BuildEventContext( 736BuildEventContext taskBuildEventContext = new BuildEventContext(
BackEnd\Components\Logging\NodeLoggingContext.cs (1)
24: base(loggingService, new BuildEventContext(nodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId), inProcNode)
BackEnd\Components\Scheduler\Scheduler.cs (4)
558BuildEventContext context = new BuildEventContext(submissionId, 0, 0, 0, 0, 0); 2019return new BuildEventContext( 2829plan.WritePlan(submissionId, _componentHost.LoggingService, new BuildEventContext(submissionId, 0, 0, 0, 0, 0)); 2838_schedulingPlan.ReadPlan(submissionId, _componentHost.LoggingService, new BuildEventContext(submissionId, 0, 0, 0, 0, 0));
BackEnd\Shared\BuildRequestConfiguration.cs (1)
485new BuildEventContext(
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (1)
185?? new BuildEventContext(
Definition\Project.cs (1)
64private static readonly BuildEventContext s_buildEventContext = new BuildEventContext(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Definition\ProjectCollection.cs (2)
359BuildEventContext buildEventContext = new BuildEventContext(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 1202var buildEventContext = new BuildEventContext(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Instance\ProjectInstance.cs (4)
309BuildEventContext buildEventContext = new BuildEventContext(buildParameters.NodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 515BuildEventContext buildEventContext = new BuildEventContext(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 589BuildEventContext buildEventContext = new BuildEventContext(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 604BuildEventContext buildEventContext = new BuildEventContext(submissionId, 0, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId);
Logging\BinaryLogger\BuildEventArgsReader.cs (1)
1471var result = new BuildEventContext(
Microsoft.Build.BuildCheck.UnitTests (1)
BuildCheckManagerProviderTests.cs (1)
45_testedInstance.ProcessCheckAcquisition(new CheckAcquisitionData("DummyPath", "ProjectPath"), new CheckLoggingContext(_loggingService, new BuildEventContext(1, 2, 3, 4, 5, 6, 7)));
Microsoft.Build.CommandLine.UnitTests (1)
TerminalLogger_Tests.cs (1)
121return new BuildEventContext(1, 1, 1, 1);
Microsoft.Build.Engine.UnitTests (100)
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\BuildResult_Tests.cs (1)
313BuildRequest request = new BuildRequest(1, 1, 2, new string[] { "alpha", "omega" }, null, new BuildEventContext(1, 1, 2, 3, 4, 5), null);
BackEnd\EventSourceSink_Tests.cs (1)
759BuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6)
BackEnd\LoggingService_Tests.cs (2)
796warningArgs.BuildEventContext = new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidProjectContextId, 5, 6); 956BuildEventContext buildEventContext = new BuildEventContext(
BackEnd\LoggingServicesLogMethod_Tests.cs (6)
37private static BuildEventContext s_buildEventContext = new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4); 42private static BuildEventContext s_targetBuildEventContext = new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, -1); 875BuildEventContext nodeBuildEventContext = new BuildEventContext(Scheduler.InProcNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 910BuildEventContext nodeBuildEventContext = new BuildEventContext(Scheduler.InProcNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 951BuildEventContext nodeBuildEventContext = new BuildEventContext(NodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 1426new BuildEventContext(1, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId),
BackEnd\MockLoggingService.cs (5)
511=> new BuildEventContext(0, 0, 0, 0, 0, 0, 0); 515=> new BuildEventContext(0, 0, 0, 0, 0, 0, 0); 550return new BuildEventContext(0, 0, 0, 0); 599return new BuildEventContext(0, 0, 0, 0); 637return new BuildEventContext(0, 0, 0, 0);
BackEnd\NodePackets_Tests.cs (7)
123return new BuildEventContext(1, 2, 3, 4, 5, 6, 7); 262new EnvironmentVariableReadEventArgs("env", "message", "file", 0, 0) { BuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6) }, 294BuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6, 7) 300BuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6, 7) 306BuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6, 7) 312BuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6, 7) 318BuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
BackEnd\SdkResolverService_Tests.cs (1)
43new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0, 0));
BackEnd\TargetResult_Tests.cs (1)
93var buildEventContext = new Framework.BuildEventContext(1, 2, 3, 4, 5, 6, 7);
BackEnd\TaskExecutionHost_Tests.cs (3)
984TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)); 1012TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)); 1237TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1));
BackEnd\TaskRegistry_Tests.cs (3)
72private readonly BuildEventContext _loggerContext = new BuildEventContext(2, 2, 2, 2); 1247InvalidProjectFileException exception = Should.Throw<InvalidProjectFileException>(() => registry.GetRegisteredTask("Task1", "none", null, false, new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)), ElementLocation.Create("none", 1, 2))); 2256new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4)));
BuildEventArgsSerialization_Tests.cs (10)
93args.BuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6); 162parentBuildEventContext: new BuildEventContext(7, 8, 9, 10, 11, 12), 165args.BuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6); 266args.BuildEventContext = new BuildEventContext(4, 5, 6, 7); 346BuildEventContext = withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null, 419BuildEventContext = withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null, 495BuildEventContext = withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null, 583BuildEventContext = withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null, 678BuildEventContext = withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null, 854OriginalBuildEventContext = new BuildEventContext(1, 2, 3, 4, 5, 6, 7),
ConfigureableForwardingLogger_Tests.cs (1)
52BuildEventContext context = new BuildEventContext(1, 2, 3, 4);
ConsoleLogger_Tests.cs (33)
490BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 610BuildEventContext = new BuildEventContext(1, 2, 3, 4) 680buildEventArgs.BuildEventContext = new BuildEventContext(1, 2, 3, 4); 721BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 727ProjectStartedEventArgs pse = new ProjectStartedEventArgs(1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 1, 1, 1)); 774BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 780ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 2, 3, 4)); 850BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 856ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 2, 3, 4)); 927BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 933ProjectStartedEventArgs pse = new ProjectStartedEventArgs(1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 1, 1, 1)); 983BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 989ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 2, 3, 4)); 1058BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 1064ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 2, 3, 4)); 1134BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 1140ProjectStartedEventArgs pse = new ProjectStartedEventArgs(-1, "ps", null, "fname", "", null, null, new BuildEventContext(1, 2, 3, 4)); 1393c.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 1441buildEvent.BuildEventContext = new BuildEventContext(1, 2, 3, 4); 1697buildEvent.BuildEventContext = new BuildEventContext(1, 2, 3, 4); 1775buildEvent.BuildEventContext = new BuildEventContext(1, 2, 3, 4); 1809buildEvent.BuildEventContext = new BuildEventContext(1, 2, 3, 4); 2135ProjectStartedEventArgs project1Started = new ProjectStartedEventArgs(1, null, null, "p", "t", null, null, new BuildEventContext(BuildEventContext.InvalidNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId)); 2136project1Started.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 2164project2Started.BuildEventContext = new BuildEventContext(2, 2, 2, 2); 2250messsage1.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 2264messsage2.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 2278messsage2.BuildEventContext = new BuildEventContext(1, 1, 1, 1); 2310BuildEventContext context = new BuildEventContext(1, 1, 1, 1); 2311BuildEventContext context2 = new BuildEventContext(2, 2, 2, 2); 2340BuildEventContext context = new BuildEventContext(1, 1, 1, 1); 2341BuildEventContext context2 = new BuildEventContext(2, 2, 2, 2); 2409BuildEventContext context = new BuildEventContext(1, 1, 1, 1);
Construction\SolutionFilter_Tests.cs (1)
31private static readonly BuildEventContext _buildEventContext = new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0);
Construction\SolutionProjectGenerator_Tests.cs (1)
39private static readonly BuildEventContext _buildEventContext = new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0);
Definition\ToolsVersion_Tests.cs (7)
40LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 86LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 106LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 125LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 145LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 169LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 936LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4));
Evaluation\Evaluator_Tests.cs (2)
4477new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))); 4495new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))));
Evaluation\Expander_Tests.cs (6)
100new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))); 811new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4))); 2330new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4)))); 2340new TestLoggingContext(null!, new BuildEventContext(1, 2, 3, 4)))); 5137new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0, 0)); 5174new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0, 0));
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)));
Instance\ProjectInstance_Internal_Tests.cs (1)
861BuildEventContext buildEventContext = new BuildEventContext(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Microsoft.Build.Framework (8)
BinaryReaderExtensions.cs (1)
91var buildEventContext = new BuildEventContext(submissionId, nodeId, evaluationId, projectInstanceId, projectContextId, targetId, taskId);
BinaryTranslator.cs (1)
425value = new BuildEventContext(
BuildEventArgs.cs (2)
244buildEventContext = new BuildEventContext(submissionId, nodeId, evaluationId, projectInstanceId, projectContextId, targetId, taskId); 248buildEventContext = new BuildEventContext(nodeId, targetId, projectContextId, taskId);
BuildEventContext.cs (2)
120return new BuildEventContext(_submissionId, _nodeId, _evaluationId, projectInstanceId, projectContextId, 134public static BuildEventContext Invalid { get; } = new BuildEventContext(InvalidNodeId, InvalidTargetId, InvalidProjectContextId, InvalidTaskId);
ProjectStartedEventArgs.cs (2)
432parentProjectBuildEventContext = new BuildEventContext(submissionId, nodeId, projectInstanceId, projectContextId, targetId, taskId); 436parentProjectBuildEventContext = new BuildEventContext(nodeId, targetId, projectContextId, taskId);
Microsoft.Build.Framework.UnitTests (54)
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 (12)
34s_baseGenericEvent.BuildEventContext = new BuildEventContext(9, 8, 7, 6); 62BuildEventContext parentBuildEventContext = new BuildEventContext(0, 0, 0, 0, 0, 0, 0); 64BuildEventContext currentBuildEventContext = new BuildEventContext(0, 1, 2, 3, 4, 5, 6); 66BuildEventContext currentBuildEventContextSubmission = new BuildEventContext(1, 0, 0, 0, 0, 0, 0); 67BuildEventContext currentBuildEventContextNode = new BuildEventContext(0, 1, 0, 0, 0, 0, 0); 68BuildEventContext currentBuildEventContextEvaluation = new BuildEventContext(0, 0, 1, 0, 0, 0, 0); 69BuildEventContext currentBuildEventContextProjectInstance = new BuildEventContext(0, 0, 0, 1, 0, 0, 0); 70BuildEventContext currentBuildEventProjectContext = new BuildEventContext(0, 0, 0, 0, 1, 0, 0); 71BuildEventContext currentBuildEventContextTarget = new BuildEventContext(0, 0, 0, 0, 0, 1, 0); 72BuildEventContext currentBuildEventContextTask = new BuildEventContext(0, 0, 0, 0, 0, 0, 1); 73BuildEventContext allDifferent = new BuildEventContext(1, 1, 1, 1, 1, 1, 1); 74BuildEventContext allSame = new BuildEventContext(0, 0, 0, 0, 0, 0, 0);
ExtendedBuildEventArgs_Tests.cs (5)
29BuildEventContext = withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null, 67BuildEventContext = withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null, 106BuildEventContext = withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null, 144BuildEventContext = withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null, 181BuildEventContext = withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
ProjectStartedEventArgs_Tests.cs (1)
30BuildEventContext parentBuildEventContext = new BuildEventContext(2, 3, 4, 5);
742 references to BuildEventContext
Microsoft.Build (432)
BackEnd\BuildManager\BuildManager.cs (58)
573loggingService.LogComment(buildEventContext: BuildEventContext.Invalid, MessageImportance.Normal, "BuildCheckEnabled"); 642loggingService.LogComment(BuildEventContext.Invalid, MessageImportance.Normal, "UsingInputCaches", string.Join(";", _buildParameters.InputResultsCacheFiles)); 647loggingService.LogComment(BuildEventContext.Invalid, MessageImportance.Normal, "WritingToOutputCache", _buildParameters.OutputResultsCacheFile); 1048(_overallBuildSuccess && loggingService.HasBuildSubmissionLoggedErrors(BuildEventContext.InvalidSubmissionId))) 1389BuildEventContext buildEventContext = new BuildEventContext( 1392BuildEventContext.InvalidProjectInstanceId, 1393BuildEventContext.InvalidProjectContextId, 1394BuildEventContext.InvalidTargetId, 1395BuildEventContext.InvalidTaskId); 1480var buildEventContext = request.BuildEventContext; 1481if (buildEventContext == BuildEventContext.Invalid) 1483buildEventContext = new BuildEventContext(request.SubmissionId, 0, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 1745BuildEventContext buildEventContext = new BuildEventContext(submission.SubmissionId, 1, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 1767private static void AddBuildRequestToSubmission(BuildSubmission submission, int configurationId, int projectContextId = BuildEventContext.InvalidProjectContextId) 1775parentBuildEventContext: BuildEventContext.Invalid, 1854BuildEventContext projectBuildEventContext = new BuildEventContext(submission.SubmissionId, 1, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 1870var buildEventContext = new BuildEventContext(submission.SubmissionId, 1, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 1927BuildEventContext.InvalidEvaluationId, 1928BuildEventContext.InvalidProjectInstanceId, 1929BuildEventContext.InvalidProjectContextId, 1930BuildEventContext.InvalidTargetId, 1931BuildEventContext.InvalidTaskId), 2451BuildEventContext buildEventContext = _projectStartedEvents.TryGetValue(result.SubmissionId, out BuildEventArgs? buildEventArgs) 2453: new BuildEventContext(result.SubmissionId, node, configuration.Project?.EvaluationId ?? BuildEventContext.InvalidEvaluationId, configuration.ConfigurationId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 2492BuildEventContext buildEventContext = new BuildEventContext(submission.SubmissionId, BuildEventContext.InvalidNodeId, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 2503loggingService?.LogError(BuildEventContext.Invalid, new BuildEventFileInfo(string.Empty) /* no project file */, "ChildExitedPrematurely", node, ExceptionHandling.DebugDumpPath, shutdownPacket.Exception.ToString()); 2648BuildEventContext buildEventContext = new BuildEventContext(0, Scheduler.VirtualNode, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 3073loggingService.LogCommentFromText(BuildEventContext.Invalid, message.Importance, message.Text); 3078loggingService.LogIncludeFile(BuildEventContext.Invalid, message.FilePath); 3234loggingService?.LogCommentFromText(BuildEventContext.Invalid, MessageImportance.High, message); 3242BuildEventContext.Invalid,
BackEnd\BuildManager\CacheAggregator.cs (1)
93BuildEventContext.InvalidSubmissionId,
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (4)
292BuildEventContext = new BuildEventContext(nodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId) 862BuildEventContext.Invalid,
BackEnd\Components\Communications\TranslatorExtensions.cs (1)
101public static void TranslateOptionalBuildEventContext(this ITranslator translator, ref BuildEventContext buildEventContext)
BackEnd\Components\Logging\BuildLoggingContext.cs (2)
33protected BuildLoggingContext(ILoggingService loggingService, BuildEventContext buildEventContext, bool inProc) : base(loggingService, buildEventContext) 39protected BuildLoggingContext(BuildLoggingContext baseContext, BuildEventContext newEventContext) : base(baseContext, newEventContext)
BackEnd\Components\Logging\EvaluationLoggingContext.cs (1)
22public EvaluationLoggingContext(ILoggingService loggingService, BuildEventContext buildEventContext, string projectFile)
BackEnd\Components\Logging\ILoggingService.cs (45)
252/// <param name="buildEventContext">A <see cref="BuildEventContext"/> to associate with the list of warning codes.</param> 254void AddWarningsAsMessages(BuildEventContext buildEventContext, ISet<string> codes); 259/// <param name="buildEventContext">A <see cref="BuildEventContext"/> to associate with the list of warning codes.</param> 261void AddWarningsAsErrors(BuildEventContext buildEventContext, ISet<string> codes); 266/// <param name="buildEventContext">A <see cref="BuildEventContext"/> to associate with the list of warning codes.</param> 268void AddWarningsNotAsErrors(BuildEventContext buildEventContext, ISet<string> codes); 282ICollection<string> GetWarningsAsErrors(BuildEventContext context); 289ICollection<string> GetWarningsNotAsErrors(BuildEventContext context); 296ICollection<string> GetWarningsAsMessages(BuildEventContext context); 342void LogComment(BuildEventContext buildEventContext, MessageImportance importance, string messageResourceName, params object[] messageArgs); 350void LogCommentFromText(BuildEventContext buildEventContext, MessageImportance importance, string message); 362void LogCommentFromText(BuildEventContext buildEventContext, MessageImportance importance, string message, params object[] messageArgs); 381void LogError(BuildEventContext buildEventContext, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs); 391void LogError(BuildEventContext buildEventContext, string subcategoryResourceName, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs); 402void LogErrorFromText(BuildEventContext buildEventContext, string subcategoryResourceName, string errorCode, string helpKeyword, BuildEventFileInfo file, string message); 409void LogInvalidProjectFileError(BuildEventContext buildEventContext, InvalidProjectFileException invalidProjectFileException); 417void LogFatalBuildError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file); 426void LogFatalTaskError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName); 436void LogFatalError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs); 447void LogTaskWarningFromException(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName); 457void LogWarning(BuildEventContext buildEventContext, string subcategoryResourceName, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs); 468void LogWarningFromText(BuildEventContext buildEventContext, string subcategoryResourceName, string warningCode, string helpKeyword, BuildEventFileInfo file, string message); 494BuildEventContext CreateEvaluationBuildEventContext(int nodeId, int submissionId); 504BuildEventContext CreateProjectCacheBuildEventContext(int submissionId, int evaluationId, int projectInstanceId, string projectFile); 512void LogProjectEvaluationStarted(BuildEventContext eventContext, string projectFile); 525BuildEventContext projectEvaluationEventContext, 546BuildEventContext LogProjectStarted( 547BuildEventContext nodeBuildEventContext, 550BuildEventContext parentBuildEventContext, 555int evaluationId = BuildEventContext.InvalidEvaluationId, 556int projectContextId = BuildEventContext.InvalidProjectContextId); 561BuildEventContext nodeBuildEventContext, 564BuildEventContext parentBuildEventContext, 569int evaluationId = BuildEventContext.InvalidEvaluationId, 570int projectContextId = BuildEventContext.InvalidProjectContextId); 578void LogProjectFinished(BuildEventContext projectBuildEventContext, string projectFile, bool success); 590BuildEventContext LogTargetStarted(BuildEventContext projectBuildEventContext, string targetName, string projectFile, string projectFileOfTargetElement, string parentTargetName, TargetBuiltReason buildReason); 601void LogTargetFinished(BuildEventContext targetBuildEventContext, string targetName, string projectFile, string projectFileOfTargetElement, bool success, IEnumerable<TaskItem> targetOutputs); 611void LogTaskStarted(BuildEventContext taskBuildEventContext, string taskName, string projectFile, string projectFileOfTaskNode, string taskAssemblyLocation); 624BuildEventContext LogTaskStarted2(BuildEventContext targetBuildEventContext, string taskName, string projectFile, string projectFileOfTaskNode, int line, int column, string taskAssemblyLocation); 634void LogTaskFinished(BuildEventContext taskBuildEventContext, string taskName, string projectFile, string projectFileOfTaskNode, bool success); 644void LogTelemetry(BuildEventContext buildEventContext, string eventName, IDictionary<string, string> properties); 653void LogIncludeFile(BuildEventContext buildEventContext, string filePath);
BackEnd\Components\Logging\LoggingContext.cs (4)
29private BuildEventContext _eventContext; 43public LoggingContext(ILoggingService loggingService, BuildEventContext eventContext) 61public LoggingContext(LoggingContext baseContext, BuildEventContext newEventContext) 89public BuildEventContext BuildEventContext
BackEnd\Components\Logging\LoggingService.cs (24)
210/// A list of build submission IDs that have logged errors. If an error is logged outside of a submission, the submission ID is <see cref="BuildEventContext.InvalidSubmissionId"/>. 215/// A list of build submission IDs that have logged errors through buildcheck. If an error is logged outside of a submission, the submission ID is <see cref="BuildEventContext.InvalidSubmissionId"/>. 220/// A list of warnings to treat as errors for an associated <see cref="BuildEventContext"/>. If an empty set, all warnings are treated as errors. 225/// A list of warnings to not to be promoted to errors for an associated <see cref="BuildEventContext"/>. 230/// A list of warnings to treat as messages for an associated <see cref="BuildEventContext"/>. 649public ICollection<string> GetWarningsAsErrors(BuildEventContext context) 660public ICollection<string> GetWarningsNotAsErrors(BuildEventContext context) 671public ICollection<string> GetWarningsAsMessages(BuildEventContext context) 686private ICollection<string> GetWarningsForProject(BuildEventContext context, IDictionary<WarningsConfigKey, ISet<string>> warningsByProject, ISet<string> warnings) 710public void AddWarningsAsErrors(BuildEventContext buildEventContext, ISet<string> codes) 720public void AddWarningsNotAsErrors(BuildEventContext buildEventContext, ISet<string> codes) 730public void AddWarningsAsMessages(BuildEventContext buildEventContext, ISet<string> codes) 741private void AddWarningsAsMessagesOrErrors(ref IDictionary<WarningsConfigKey, ISet<string>> warningsByProject, BuildEventContext buildEventContext, ISet<string> codes) 990BuildEventContext buildEventContext = buildEvent?.BuildEventContext ?? BuildEventContext.Invalid; 1011if (warning.ProjectFile == null && buildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 1253if ((warningEvent = buildEvent as BuildWarningEventArgs) != null && warningEvent.BuildEventContext != null && warningEvent.BuildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 1257else if ((errorEvent = buildEvent as BuildErrorEventArgs) != null && errorEvent.BuildEventContext != null && errorEvent.BuildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 1261else if ((messageEvent = buildEvent as BuildMessageEventArgs) != null && messageEvent.BuildEventContext != null && messageEvent.BuildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 1370private static WarningsConfigKey GetWarningsConfigKey(BuildEventContext buildEventContext) 1656int submissionId = errorEvent.BuildEventContext?.SubmissionId ?? BuildEventContext.InvalidSubmissionId; 1930private string GetAndVerifyProjectFileFromContext(BuildEventContext context) 1957if (_warningsAsMessagesByProject != null && warningEvent.BuildEventContext != null && warningEvent.BuildEventContext.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId) 1994if (_warningsAsErrorsByProject != null && warningEvent.BuildEventContext != null && warningEvent.BuildEventContext.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId)
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (52)
37public void LogComment(BuildEventContext buildEventContext, MessageImportance importance, string messageResourceName, params object[] messageArgs) 56public void LogCommentFromText(BuildEventContext buildEventContext, MessageImportance importance, string message) 71public void LogCommentFromText(BuildEventContext buildEventContext, MessageImportance importance, string message, params object[] messageArgs) 97public void LogError(BuildEventContext location, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs) 111public void LogError(BuildEventContext buildEventContext, string subcategoryResourceName, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs) 131public void LogErrorFromText(BuildEventContext buildEventContext, string subcategoryResourceName, string errorCode, string helpKeyword, BuildEventFileInfo file, string message) 135if (buildEvent.ProjectFile == null && buildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 154public void LogInvalidProjectFileError(BuildEventContext buildEventContext, InvalidProjectFileException invalidProjectFileException) 175if (buildEvent.ProjectFile == null && buildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 194public void LogFatalBuildError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file) 208public void LogFatalTaskError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName) 225public void LogFatalError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs) 259public void LogTaskWarningFromException(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName) 284public void LogWarning(BuildEventContext buildEventContext, string subcategoryResourceName, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs) 301public void LogWarningFromText(BuildEventContext buildEventContext, string subcategoryResourceName, string warningCode, string helpKeyword, BuildEventFileInfo file, string message) 327if (buildEvent.ProjectFile == null && buildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId) 404public BuildEventContext CreateEvaluationBuildEventContext(int nodeId, int submissionId) 405=> new BuildEventContext(submissionId, nodeId, NextEvaluationId, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 408public BuildEventContext CreateProjectCacheBuildEventContext( 423return new BuildEventContext(submissionId, nodeId, evaluationId, projectInstanceId, projectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 427public void LogProjectEvaluationStarted(BuildEventContext projectEvaluationEventContext, string projectFile) 451BuildEventContext projectEvaluationEventContext, 489public BuildEventContext LogProjectStarted( 490BuildEventContext nodeBuildEventContext, 493BuildEventContext parentBuildEventContext, 498int evaluationId = BuildEventContext.InvalidEvaluationId, 499int projectContextId = BuildEventContext.InvalidProjectContextId) 523BuildEventContext nodeBuildEventContext, 526BuildEventContext parentBuildEventContext, 531int evaluationId = BuildEventContext.InvalidEvaluationId, 532int projectContextId = BuildEventContext.InvalidProjectContextId) 536if (projectContextId == BuildEventContext.InvalidProjectContextId) 572BuildEventContext projectBuildEventContext = new BuildEventContext(submissionId, nodeBuildEventContext.NodeId, evaluationId, configurationId, projectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 606public void LogProjectFinished(BuildEventContext projectBuildEventContext, string projectFile, bool success) 636public BuildEventContext LogTargetStarted(BuildEventContext projectBuildEventContext, string targetName, string projectFile, string projectFileOfTargetElement, string parentTargetName, TargetBuiltReason buildReason) 639BuildEventContext targetBuildEventContext = new BuildEventContext( 645BuildEventContext.InvalidTaskId); 675public void LogTargetFinished(BuildEventContext targetBuildEventContext, string targetName, string projectFile, string projectFileOfTargetElement, bool success, IEnumerable<TaskItem> targetOutputs) 704public void LogTaskStarted(BuildEventContext taskBuildEventContext, string taskName, string projectFile, string projectFileOfTaskNode, string taskAssemblyLocation) 733public BuildEventContext LogTaskStarted2(BuildEventContext targetBuildEventContext, string taskName, string projectFile, string projectFileOfTaskNode, int line, int column, string taskAssemblyLocation) 736BuildEventContext taskBuildEventContext = new BuildEventContext( 771public void LogTaskFinished(BuildEventContext taskBuildEventContext, string taskName, string projectFile, string projectFileOfTaskNode, bool success) 799public void LogTelemetry(BuildEventContext buildEventContext, string eventName, IDictionary<string, string> properties) 821public void LogIncludeFile(BuildEventContext buildEventContext, string filePath)
BackEnd\Components\Logging\NodeLoggingContext.cs (5)
24: base(loggingService, new BuildEventContext(nodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId), inProcNode) 26ErrorUtilities.VerifyThrow(nodeId != BuildEventContext.InvalidNodeId, "Should not ever be given an invalid NodeId"); 85int evaluationId = (configuration != null && !configuration.IsCached && configuration.Project != null) ? configuration.Project.EvaluationId : BuildEventContext.InvalidEvaluationId;
BackEnd\Components\Logging\ProjectLoggingContext.cs (5)
57int evaluationId = BuildEventContext.InvalidEvaluationId) 125BuildEventContext parentBuildEventContext, 152private static BuildEventContext CreateInitialContext( 161BuildEventContext parentBuildEventContext, 192BuildEventContext parentBuildEventContext,
BackEnd\Components\Logging\TargetLoggingContext.cs (3)
48private static BuildEventContext CreateInitialContext(ProjectLoggingContext projectLoggingContext, 52BuildEventContext buildEventContext = projectLoggingContext.LoggingService.LogTargetStarted( 62internal TargetLoggingContext(ILoggingService loggingService, BuildEventContext outOfProcContext)
BackEnd\Components\Logging\TaskLoggingContext.cs (3)
46private static BuildEventContext CreateInitialContext(TargetLoggingContext targetLoggingContext, 49BuildEventContext buildEventContext = targetLoggingContext.LoggingService.LogTaskStarted2( 87internal TaskLoggingContext(ILoggingService loggingService, BuildEventContext outOfProcContext)
BackEnd\Components\ProjectCache\ProjectCacheService.cs (10)
201BuildEventContext buildEventContext = BuildEventContext.Invalid; 447_buildManager.PostCacheResult(cacheRequest, CacheResult.IndicateException(e), BuildEventContext.InvalidProjectContextId); 459BuildEventContext buildEventContext = _loggingService.CreateProjectCacheBuildEventContext( 502private async Task<CacheResult> GetCacheResultAsync(BuildRequestData buildRequest, BuildRequestConfiguration buildRequestConfiguration, BuildEventContext buildEventContext, CancellationToken cancellationToken) 709BuildEventContext buildEventContext, 812BuildEventContext buildEventContext = BuildEventContext.Invalid; 891private readonly BuildEventContext _buildEventContext; 899BuildEventContext buildEventContext,
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
283BuildEventContext buildEventContext,
BackEnd\Components\RequestBuilder\RequestBuilder.cs (3)
1279BuildEventContext projectBuildEventContext = _projectLoggingContext?.BuildEventContext; 1387BuildEventContext buildEventContext = _projectLoggingContext?.BuildEventContext; 1391if (project != null && buildEventContext != null && loggingService != null && buildEventContext.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId)
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (2)
55internal TargetUpToDateChecker(ProjectInstance project, ProjectTargetInstance targetToAnalyze, ILoggingService loggingServices, BuildEventContext buildEventContext) 1252private BuildEventContext _buildEventContext;
BackEnd\Components\Scheduler\Scheduler.cs (9)
558BuildEventContext context = new BuildEventContext(submissionId, 0, 0, 0, 0, 0); 2017BuildEventContext NewBuildEventContext() 2022BuildEventContext.InvalidProjectInstanceId, 2023BuildEventContext.InvalidProjectContextId, 2024BuildEventContext.InvalidTargetId, 2025BuildEventContext.InvalidTaskId); 2294private void WriteNodeUtilizationGraph(ILoggingService loggingService, BuildEventContext context, bool useConfigurations) 2428private void WriteNodeUtilizationGraphLine(ILoggingService loggingService, BuildEventContext context, int[] currentWork, int[] previousWork, DateTime currentEventTime, DateTime previousEventTime, int invalidWorkId, ref double accumulatedDuration) 2500private void WriteRecursiveSummary(ILoggingService loggingService, BuildEventContext context, int submissionId, SchedulableRequest request, int level, bool useConfigurations, bool isLastChild)
BackEnd\Components\Scheduler\SchedulingPlan.cs (2)
86public void WritePlan(int submissionId, ILoggingService loggingService, BuildEventContext buildEventContext) 135public void ReadPlan(int submissionId, ILoggingService loggingService, BuildEventContext buildEventContext)
BackEnd\Components\SdkResolution\SdkResolverRequest.cs (4)
17private BuildEventContext _buildEventContext; 33private SdkResolverRequest(int submissionId, string name, string version, string minimumVersion, BuildEventContext buildEventContext, ElementLocation elementLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio) 47public BuildEventContext BuildEventContext => _buildEventContext; 71public static SdkResolverRequest Create(int submissionId, SdkReference sdkReference, BuildEventContext buildEventContext, ElementLocation elementLocation, string solutionPath, string projectPath, bool interactive, bool isRunningInVisualStudio)
BackEnd\Components\SdkResolution\SdkResolverService.cs (3)
144BuildEventContext.InvalidSubmissionId, // disables GetResolverState/SetResolverState 451if (submissionId != BuildEventContext.InvalidSubmissionId) 532if (submissionId != BuildEventContext.InvalidSubmissionId)
BackEnd\Node\OutOfProcNode.cs (1)
596_loggingService.LogError(_loggingContext?.BuildEventContext ?? BuildEventContext.Invalid, null, BuildEventFileInfo.Empty,
BackEnd\Shared\BuildRequest.cs (11)
76private BuildEventContext _parentBuildEventContext; 81private BuildEventContext _buildEventContext; 116_buildEventContext = BuildEventContext.Invalid; 148int projectContextId = BuildEventContext.InvalidProjectContextId) 156_parentBuildEventContext = BuildEventContext.Invalid; 179BuildEventContext parentBuildEventContext, 184int projectContextId = BuildEventContext.InvalidProjectContextId) 327public BuildEventContext ParentBuildEventContext 337public BuildEventContext BuildEventContext 347ErrorUtilities.VerifyThrow(_buildEventContext == BuildEventContext.Invalid, "The build event context is already set."); 357public BuildEventContext CurrentTaskContext { get; set; }
BackEnd\Shared\BuildRequestConfiguration.cs (5)
488BuildEventContext.InvalidEvaluationId, 489BuildEventContext.InvalidProjectInstanceId, 490BuildEventContext.InvalidProjectContextId, 491BuildEventContext.InvalidTargetId, 492BuildEventContext.InvalidTaskId),
BackEnd\Shared\EventsCreatorHelper.cs (3)
16public static BuildMessageEventArgs CreateMessageEventFromText(BuildEventContext buildEventContext, MessageImportance importance, string message, params object?[]? messageArgs) 33public static BuildErrorEventArgs CreateErrorEventFromText(BuildEventContext buildEventContext, string? subcategoryResourceName, string? errorCode, string? helpKeyword, BuildEventFileInfo file, string message) 64public static BuildWarningEventArgs CreateWarningEventFromText(BuildEventContext buildEventContext, string? subcategoryResourceName, string? errorCode, string? helpKeyword, BuildEventFileInfo file, string message)
BackEnd\Shared\TargetResult.cs (5)
50/// The (possibly null) <see cref="BuildEventContext"/> from the original target build 52private BuildEventContext _originalBuildEventContext; 66internal TargetResult(TaskItem[] items, WorkUnitResult result, BuildEventContext originalBuildEventContext = null) 165/// The (possibly null) <see cref="BuildEventContext"/> from the original target build 167internal BuildEventContext OriginalBuildEventContext => _originalBuildEventContext;
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (5)
184private BuildEventContext GetBuildEventContext(BuildEventArgs e) => e.BuildEventContext 186BuildEventContext.InvalidNodeId, 187BuildEventContext.InvalidTargetId, 188BuildEventContext.InvalidProjectContextId, 189BuildEventContext.InvalidTaskId);
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (5)
518private bool TryGetProjectFullPath(BuildEventContext buildEventContext, out string projectFullPath) 599public void EndProjectEvaluation(BuildEventContext buildEventContext) 605BuildEventContext buildEventContext = checkContext.BuildEventContext; 647eventArgs.BuildEventContext.EvaluationId == BuildEventContext.InvalidEvaluationId || 649eventArgs.BuildEventContext.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId ||
BuildCheck\Infrastructure\BuildEventsProcessor.cs (2)
34public TaskKey(BuildEventContext context) 43/// Keeps track of in-flight tasks. Keyed by task ID as passed in <see cref="BuildEventContext.TaskId"/>.
BuildCheck\Infrastructure\CheckContext\CheckDispatchingContext.cs (4)
18private readonly BuildEventContext _eventContext; 22BuildEventContext eventContext) 28public BuildEventContext BuildEventContext => _eventContext; 47private void DispatchAsCommentFromText(BuildEventContext buildEventContext, MessageImportance importance, string message, params object?[]? messageArgs)
BuildCheck\Infrastructure\CheckContext\CheckDispatchingContextFactory.cs (1)
22public ICheckContext CreateCheckContext(BuildEventContext eventContext)
BuildCheck\Infrastructure\CheckContext\CheckLoggingContext.cs (2)
20internal readonly struct CheckLoggingContext(ILoggingService loggingService, BuildEventContext eventContext) 23public BuildEventContext BuildEventContext => eventContext;
BuildCheck\Infrastructure\CheckContext\CheckLoggingContextFactory.cs (1)
15public ICheckContext CreateCheckContext(BuildEventContext eventContext)
BuildCheck\Infrastructure\CheckContext\ICheckContext.cs (1)
18BuildEventContext BuildEventContext { get; }
BuildCheck\Infrastructure\CheckContext\ICheckContextFactory.cs (1)
10ICheckContext CreateCheckContext(BuildEventContext eventContext);
BuildCheck\Infrastructure\IBuildCheckManager.cs (1)
79void EndProjectEvaluation(BuildEventContext buildEventContext);
BuildCheck\Infrastructure\NullBuildCheckManager.cs (1)
71public void EndProjectEvaluation(BuildEventContext buildEventContext)
Construction\Solution\SolutionProjectGenerator.cs (4)
136private readonly BuildEventContext _projectBuildEventContext; 175BuildEventContext projectBuildEventContext, 213BuildEventContext projectBuildEventContext, 217int submissionId = BuildEventContext.InvalidSubmissionId)
Definition\Project.cs (12)
64private static readonly BuildEventContext s_buildEventContext = new BuildEventContext(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 832/// This number corresponds to the <see cref="BuildEventContext.EvaluationId"/> and can be used to connect 2486/// This number corresponds to the <see cref="BuildEventContext.EvaluationId"/> and can be used to connect 3731BuildEventContext.InvalidSubmissionId, 3735ErrorUtilities.VerifyThrow(LastEvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID"); 3803ErrorUtilities.VerifyThrow(LastEvaluationId == BuildEventContext.InvalidEvaluationId, "This is the first evaluation therefore the last evaluation id is invalid"); 3807ErrorUtilities.VerifyThrow(LastEvaluationId != BuildEventContext.InvalidEvaluationId, "Last evaluation ID must be valid after the first evaluation"); 4158public int EvaluationId { get; set; } = BuildEventContext.InvalidEvaluationId; 4281EvaluationId = BuildEventContext.InvalidEvaluationId;
Definition\ProjectCollection.cs (8)
359BuildEventContext buildEventContext = new BuildEventContext(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 1202var buildEventContext = new BuildEventContext(0 /* node ID */, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
Evaluation\Conditionals\Parser.cs (2)
54private BuildEventContext _logBuildEventContext; 59internal BuildEventContext LogBuildEventContext
Evaluation\ConditionEvaluator.cs (2)
12using BuildEventContext = Microsoft.Build.Framework.BuildEventContext; 260conditionParser.LogBuildEventContext = loggingContext?.BuildEventContext ?? BuildEventContext.Invalid;
Evaluation\Evaluator.cs (5)
214BuildEventContext buildEventContext) 309BuildEventContext buildEventContext, 363internal static List<I> CreateItemsFromInclude(string rootDirectory, ProjectItemElement itemElement, IItemFactory<I, I> itemFactory, string unevaluatedIncludeEscaped, Expander<P, I> expander, ILoggingService loggingService, string buildEventFileInfoFullPath, BuildEventContext buildEventContext) 619ErrorUtilities.VerifyThrow(_data.EvaluationId == BuildEventContext.InvalidEvaluationId, "There is no prior evaluation ID. The evaluator data needs to be reset at this point"); 647ErrorUtilities.VerifyThrow(_data.EvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID");
Instance\ProjectInstance.cs (29)
188private int _evaluationId = BuildEventContext.InvalidEvaluationId; 309BuildEventContext buildEventContext = new BuildEventContext(buildParameters.NodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 515BuildEventContext buildEventContext = new BuildEventContext(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 589BuildEventContext buildEventContext = new BuildEventContext(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 604BuildEventContext buildEventContext = new BuildEventContext(submissionId, 0, BuildEventContext.InvalidProjectInstanceId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidTaskId); 613internal ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, int submissionId, ProjectLoadSettings? projectLoadSettings) 629internal ProjectInstance(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, int submissionId) 2534BuildEventContext projectBuildEventContext, 2596BuildEventContext projectBuildEventContext, 2879BuildEventContext projectBuildEventContext, 2933BuildEventContext projectBuildEventContext, 3077BuildEventContext buildEventContext, 3079int submissionId = BuildEventContext.InvalidSubmissionId, 3167ErrorUtilities.VerifyThrow(EvaluationId == BuildEventContext.InvalidEvaluationId, "Evaluation ID is invalid prior to evaluation"); 3189ErrorUtilities.VerifyThrow(EvaluationId != BuildEventContext.InvalidEvaluationId, "Evaluation should produce an evaluation ID"); 3458public GenericLoggingContext(ILoggingService loggingService, BuildEventContext eventContext)
Logging\BinaryLogger\BinaryLogger.cs (1)
306args.BuildEventContext = BuildEventContext.Invalid;
Logging\BinaryLogger\BuildEventArgsFields.cs (1)
20public BuildEventContext BuildEventContext { get; set; }
Logging\BinaryLogger\BuildEventArgsReader.cs (5)
565BuildEventContext? originalBuildEventContext = null; 736BuildEventContext? parentContext = null; 1455private BuildEventContext ReadBuildEventContext() 1465int evaluationId = BuildEventContext.InvalidEvaluationId; 1471var result = new BuildEventContext(
Logging\BinaryLogger\BuildEventArgsWriter.cs (2)
252buildMessageEventArgs.BuildEventContext = e.BuildEventContext ?? BuildEventContext.Invalid; 1070private void Write(BuildEventContext buildEventContext)
Logging\ParallelLogger\ParallelConsoleLogger.cs (27)
68_deferredMessages = new Dictionary<BuildEventContext, List<BuildMessageEventArgs>>(s_compareContextNodeId); 177private void ShownBuildEventContext(BuildEventContext e) 209_deferredMessages = new Dictionary<BuildEventContext, List<BuildMessageEventArgs>>(s_compareContextNodeId); 462BuildEventContext previousEntryPoint = null; 642private (int, int) GetEvaluationKey(BuildEventContext buildEventContext) 1156&& e.BuildEventContext.ProjectContextId != BuildEventContext.InvalidProjectContextId 1221private void DisplayDeferredStartedEvents(BuildEventContext e) 1269if (e.BuildEventContext.TaskId != BuildEventContext.InvalidTaskId && e.File == null) 1282if ((IsVerbosityAtLeast(LoggerVerbosity.Diagnostic) || _showEventId) && e.BuildEventContext.TaskId != BuildEventContext.InvalidTaskId) 1312BuildEventContext currentBuildEventContext = e.BuildEventContext; 1361private bool WriteTargetMessagePrefix(BuildEventArgs e, BuildEventContext context, DateTime timeStamp) 1423private void DisplayDeferredTargetStartedEvent(BuildEventContext e) 1498private void DisplayDeferredProjectStartedEvent(BuildEventContext e) 1596private void WriteLinePrefix(BuildEventContext e, DateTime eventTimeStamp, bool isMessagePrefix) 1640private ProjectFullKey GetFullProjectKey(BuildEventContext e) 1694private Dictionary<BuildEventContext, object> _startedEvent; 1707internal void AddEventStarted(string projectTargetNames, BuildEventContext buildEventContext, DateTime eventTimeStamp, IEqualityComparer<BuildEventContext> comparer) 1721? new Dictionary<BuildEventContext, object>() 1722: new Dictionary<BuildEventContext, object>(comparer); 1734internal void AddEventFinished(string projectTargetNames, BuildEventContext buildEventContext, DateTime eventTimeStamp) 1784private static readonly ComparerContextNodeId<BuildEventContext> s_compareContextNodeId = new ComparerContextNodeId<BuildEventContext>(); 1785private static readonly ComparerContextNodeIdTargetId<BuildEventContext> s_compareContextNodeIdTargetId = new ComparerContextNodeIdTargetId<BuildEventContext>(); 1786private BuildEventContext _lastDisplayedBuildEventContext; 1799private Dictionary<BuildEventContext, List<BuildMessageEventArgs>> _deferredMessages;
Logging\ParallelLogger\ParallelLoggerHelpers.cs (37)
20private Dictionary<BuildEventContext, ProjectStartedEventMinimumFields> _projectStartedEvents; 21private Dictionary<BuildEventContext, TargetStartedEventMinimumFields> _targetStartedEvents; 24private static ComparerContextNodeId<BuildEventContext> s_compareContextNodeId = new ComparerContextNodeId<BuildEventContext>(); 25private static ComparerContextNodeIdTargetId<BuildEventContext> s_compareContextNodeIdTargetId = new ComparerContextNodeIdTargetId<BuildEventContext>(); 32_projectStartedEvents = new Dictionary<BuildEventContext, ProjectStartedEventMinimumFields>(s_compareContextNodeId); 33_targetStartedEvents = new Dictionary<BuildEventContext, TargetStartedEventMinimumFields>(s_compareContextNodeIdTargetId); 94internal List<ProjectStartedEventMinimumFields> GetProjectCallStack(BuildEventContext e) 121internal void SetErrorWarningFlagOnCallStack(BuildEventContext e) 137internal string[] ProjectCallStackFromProject(BuildEventContext e) 139BuildEventContext currentKey = e; 171internal ProjectStartedEventMinimumFields GetProjectStartedEvent(BuildEventContext e) 180internal TargetStartedEventMinimumFields GetTargetStartedEvent(BuildEventContext e) 189internal void RemoveProjectStartedEvent(BuildEventContext e) 202internal void RemoveTargetStartedEvent(BuildEventContext e) 222BuildEventContext contextX = x as BuildEventContext; 223BuildEventContext contextY = y as BuildEventContext; 237BuildEventContext context = x as BuildEventContext; 251BuildEventContext contextX = x as BuildEventContext; 252BuildEventContext contextY = y as BuildEventContext; 267BuildEventContext context = x as BuildEventContext; 288private BuildEventContext _buildEventContext; 384internal BuildEventContext ProjectBuildEventContext 427private BuildEventContext _buildEventContext; 496internal BuildEventContext ProjectBuildEventContext 539private BuildEventContext _entryPointContext; 541private static ComparerContextNodeId<BuildEventContext> s_eventComparer = new ComparerContextNodeId<BuildEventContext>(); 545internal ErrorWarningSummaryDictionaryKey(BuildEventContext entryPoint, string targetName) 553internal BuildEventContext EntryPointContext
LogMessagePacketBase.cs (3)
1019var buildEventContext = args.BuildEventContext; 1406private (BuildEventContext buildEventContext, DateTime timestamp, string projectFile) 1409BuildEventContext buildEventContext = null;
Utilities\EngineFileUtilities.cs (3)
112BuildEventContext buildEventContext = null, 184BuildEventContext buildEventContext = null, 424private static void LogDriveEnumerationWarningWithLoggingService(ILoggingService loggingService, IElementLocation includeLocation, BuildEventContext buildEventContext, string buildEventFileInfoFullPath, string filespecUnescaped)
Microsoft.Build.CommandLine.UnitTests (1)
TerminalLogger_Tests.cs (1)
119private BuildEventContext MakeBuildEventContext()
Microsoft.Build.Engine.OM.UnitTests (1)
Definition\Project_Tests.cs (1)
3869initialEvaluationId.ShouldNotBe(BuildEventContext.InvalidEvaluationId);
Microsoft.Build.Engine.UnitTests (245)
BackEnd\BuildRequest_Tests.cs (3)
165BuildEventContext.Invalid, 192BuildEventContext.Invalid, 201return new BuildRequest(1 /* submissionId */, _nodeRequestId++, configurationId, targets, null, BuildEventContext.Invalid, null);
BackEnd\BuildRequestEngine_Tests.cs (1)
513BuildRequest request = new BuildRequest(1 /* submission id */, _nodeRequestId++, configurationId, targets, null, BuildEventContext.Invalid, null);
BackEnd\BuildRequestEntry_Tests.cs (1)
279return new BuildRequest(1 /* submissionId */, _nodeRequestId++, configurationId, targets, null, BuildEventContext.Invalid, null);
BackEnd\BuildResult_Tests.cs (1)
349return new BuildRequest(1 /* submissionId */, _nodeRequestId++, configurationId, targets, null, BuildEventContext.Invalid, null);
BackEnd\CacheAggregator_Tests.cs (12)
82var buildResult = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null)); 103var buildResult = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null)); 108var buildResult2 = new BuildResult(new BuildRequest(1, 2, configurationId: 2, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null)); 132var buildResult = new BuildResult(new BuildRequest(1, 2, configurationId: 2, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null)); 154var buildResult11 = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null)); 162var buildResult21 = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "e", "f" }, null, BuildEventContext.Invalid, null)); 198var buildResult = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null)); 217var buildResult11 = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "a", "b" }, null, BuildEventContext.Invalid, null)); 219var buildResult12 = new BuildResult(new BuildRequest(1, 2, configurationId: 2, new List<string>() { "c", "d" }, null, BuildEventContext.Invalid, null)); 229var buildResult21 = new BuildResult(new BuildRequest(1, 2, configurationId: 1, new List<string>() { "e", "f" }, null, BuildEventContext.Invalid, null)); 231var buildResult22 = new BuildResult(new BuildRequest(1, 2, configurationId: 2, new List<string>() { "g", "h" }, null, BuildEventContext.Invalid, null)); 283aggregatedBuildResult.SubmissionId.ShouldBe(BuildEventContext.InvalidSubmissionId);
BackEnd\CacheSerialization_Tests.cs (3)
44var request1 = new BuildRequest(1, 0, 1, new string[] { "target1", "target2", "target3" }, null, BuildEventContext.Invalid, null); 45var request2 = new BuildRequest(2, 0, 2, new string[] { "target2" }, null, BuildEventContext.Invalid, null); 46var request3 = new BuildRequest(3, 0, 3, new string[] { "target3" }, null, BuildEventContext.Invalid, null);
BackEnd\IntrinsicTask_Tests.cs (2)
3958BuildRequestEntry entry = new BuildRequestEntry(new BuildRequest(1 /* submissionId */, 0, 1, new string[] { "t" }, null, BuildEventContext.Invalid, null), new BuildRequestConfiguration(1, new BuildRequestData("projectFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0")); 3993var entry = new BuildRequestEntry(new BuildRequest(1 /* submissionId */, 0, 1, new string[] { targetName }, null, BuildEventContext.Invalid, null), new BuildRequestConfiguration(1, new BuildRequestData("projectFile", new Dictionary<string, string>(), "3.5", Array.Empty<string>(), null), "2.0"));
BackEnd\LoggingService_Tests.cs (5)
796warningArgs.BuildEventContext = new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidProjectContextId, 5, 6); 956BuildEventContext buildEventContext = new BuildEventContext( 978BuildEventContext projectStarted = loggingService.LogProjectStarted(buildEventContext, 0, buildEventContext.ProjectInstanceId, BuildEventContext.Invalid, "projectFile", "Build", Enumerable.Empty<DictionaryEntry>(), Enumerable.Empty<DictionaryEntry>());
BackEnd\LoggingServicesLogMethod_Tests.cs (33)
37private static BuildEventContext s_buildEventContext = new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4); 42private static BuildEventContext s_targetBuildEventContext = new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, -1); 845BuildEventContext context = service.LogProjectStarted(s_buildEventContext, 1, 2, s_buildEventContext, projectFile, targetNames, null, null); 846BuildEventContext parentBuildEventContext = s_buildEventContext; 871BuildEventContext projectCacheBuildEventContext = service.CreateProjectCacheBuildEventContext(SubmissionId, EvaluationId, ConfigurationId, ProjectFile); 873projectCacheBuildEventContext.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId); 875BuildEventContext nodeBuildEventContext = new BuildEventContext(Scheduler.InProcNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 876BuildEventContext projectStartedBuildEventContext = service.LogProjectStarted( 880parentBuildEventContext: BuildEventContext.Invalid, 910BuildEventContext nodeBuildEventContext = new BuildEventContext(Scheduler.InProcNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 917parentBuildEventContext: BuildEventContext.Invalid, 951BuildEventContext nodeBuildEventContext = new BuildEventContext(NodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId); 952BuildEventContext projectStartedBuildEventContext = service.LogProjectStarted( 956parentBuildEventContext: BuildEventContext.Invalid, 1284private void TestLogTelemetry(BuildEventContext buildEventContext, string eventName, IDictionary<string, string> properties) 1425BuildEventContext projectContext = service.LogProjectStarted( 1426new BuildEventContext(1, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId), 1662private void VerifyProjectFinishedEvent(ProcessBuildEventHelper service, BuildEventContext projectContext, string message, string projectFile, bool success) 1683private void VerifyProjectStartedEventArgs(ProcessBuildEventHelper service, int projectId, string message, string projectFile, string targetNames, BuildEventContext parentBuildEventContext, BuildEventContext generatedContext)
BackEnd\MockLoggingService.cs (42)
256public void AddWarningsAsMessages(BuildEventContext buildEventContext, ISet<string> codes) 261public void AddWarningsAsErrors(BuildEventContext buildEventContext, ISet<string> codes) 266public void AddWarningsNotAsErrors(BuildEventContext buildEventContext, ISet<string> codes) 318public void LogComment(BuildEventContext buildEventContext, MessageImportance importance, string messageResourceName, params object[] messageArgs) 333public void LogCommentFromText(BuildEventContext buildEventContext, MessageImportance importance, string message) 339public void LogCommentFromText(BuildEventContext buildEventContext, MessageImportance importance, string message, params object[] messageArgs) 364public void LogError(BuildEventContext buildEventContext, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs) 381public void LogError(BuildEventContext buildEventContext, string subcategoryResourceName, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs) 399public void LogErrorFromText(BuildEventContext buildEventContext, string subcategoryResourceName, string errorCode, string helpKeyword, BuildEventFileInfo file, string message) 409public void LogInvalidProjectFileError(BuildEventContext buildEventContext, InvalidProjectFileException invalidProjectFileException) 419public void LogFatalBuildError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file) 431public void LogFatalTaskError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName) 443public void LogFatalError(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs) 454public void LogTaskWarningFromException(BuildEventContext buildEventContext, Exception exception, BuildEventFileInfo file, string taskName) 466public void LogWarning(BuildEventContext buildEventContext, string subcategoryResourceName, BuildEventFileInfo file, string messageResourceName, params object[] messageArgs) 484public void LogWarningFromText(BuildEventContext buildEventContext, string subcategoryResourceName, string warningCode, string helpKeyword, BuildEventFileInfo file, string message) 510public BuildEventContext CreateEvaluationBuildEventContext(int nodeId, int submissionId) 514public BuildEventContext CreateProjectCacheBuildEventContext(int submissionId, int evaluationId, int projectInstanceId, string projectFile) 518public void LogProjectEvaluationStarted(BuildEventContext eventContext, string projectFile) 526BuildEventContext projectEvaluationEventContext, 538public BuildEventContext LogProjectStarted( 539BuildEventContext nodeBuildEventContext, 542BuildEventContext parentBuildEventContext, 547int evaluationId = BuildEventContext.InvalidEvaluationId, 548int projectContextId = BuildEventContext.InvalidProjectContextId) 557BuildEventContext nodeBuildEventContext, 560BuildEventContext parentBuildEventContext, 565int evaluationId = BuildEventContext.InvalidEvaluationId, 566int projectContextId = BuildEventContext.InvalidProjectContextId) 585public void LogProjectFinished(BuildEventContext projectBuildEventContext, string projectFile, bool success) 597public BuildEventContext LogTargetStarted(BuildEventContext projectBuildEventContext, string targetName, string projectFile, string projectFileOfTargetElement, string parentTargetName, TargetBuiltReason buildReason) 610public void LogTargetFinished(BuildEventContext targetBuildEventContext, string targetName, string projectFile, string projectFileOfTargetElement, bool success, IEnumerable<TaskItem> targetOutputs) 622public void LogTaskStarted(BuildEventContext targetBuildEventContext, string taskName, string projectFile, string projectFileOfTaskNode, string taskAssemblyLocation) 635public BuildEventContext LogTaskStarted2(BuildEventContext targetBuildEventContext, string taskName, string projectFile, string projectFileOfTaskNode, int line, int column, string taskAssemblyLocation) 648public void LogTaskFinished(BuildEventContext taskBuildEventContext, string taskName, string projectFile, string projectFileOfTaskNode, bool success) 658public void LogTelemetry(BuildEventContext buildEventContext, string eventName, IDictionary<string, string> properties) 667public ICollection<string> GetWarningsAsErrors(BuildEventContext context) 672public ICollection<string> GetWarningsNotAsErrors(BuildEventContext context) 677public ICollection<string> GetWarningsAsMessages(BuildEventContext context) 682public void LogIncludeFile(BuildEventContext buildEventContext, string filePath)
BackEnd\NodePackets_Tests.cs (1)
121private static BuildEventContext CreateBuildEventContext()
BackEnd\RequestBuilder_Tests.cs (1)
318return new BuildRequest(1 /* submissionId */, _nodeRequestId++, configurationId, targets, null, BuildEventContext.Invalid, null);
BackEnd\ResultsCache_Tests.cs (22)
36BuildRequest request = new BuildRequest(1 /* submissionId */, 0, 1, new string[1] { "testTarget" }, null, BuildEventContext.Invalid, null); BuildResult result = new BuildResult(request); 49BuildRequest request = new BuildRequest(1 /* submissionId */, 0, 1, new string[1] { "testTarget" }, null, BuildEventContext.Invalid, null); 54request = new BuildRequest(1 /* submissionId */, 0, 1, new string[1] { "otherTarget" }, null, BuildEventContext.Invalid, null); 69BuildRequest request = new BuildRequest(submissionId: 1, nodeRequestId: 0, configurationId: 1, new string[1] { "testTarget" }, null, BuildEventContext.Invalid, null); 74request = new BuildRequest(1 /* submissionId */, 0, 1, new string[1] { "otherTarget" }, null, BuildEventContext.Invalid, null); 79BuildResult result2 = new BuildResult(new BuildRequest(submissionId: 1, nodeRequestId: 0, configurationId: 2, new string[1] { "testTarget" }, null, BuildEventContext.Invalid, null)); 97BuildRequest request = new BuildRequest(1 /* submissionId */, 0, 1, new string[1] { "testTarget" }, null, BuildEventContext.Invalid, null); 106BuildRequest request = new BuildRequest(1 /* submissionId */, 0, 1, new string[2] { "testTarget", "testTarget2" }, null, BuildEventContext.Invalid, null); 125BuildRequest request = new BuildRequest(1 /* submissionId */, 0, 1, new string[] { "testTarget" }, null, BuildEventContext.Invalid, null); 144BuildRequest request = new BuildRequest(1 /* submissionId */, 0, 1, new string[2] { "testTarget", "testTarget2" }, null, BuildEventContext.Invalid, null); 156BuildRequest request = new BuildRequest(1 /* submissionId */, 0, 1, new string[1] { "testTarget2" }, null, BuildEventContext.Invalid, null); 179BuildRequest request = new BuildRequest(1 /* submissionId */, 0, 1, new string[1] { "testTarget2" }, null, BuildEventContext.Invalid, null); 209BuildEventContext.Invalid /* parentBuildEventContext */, 219BuildEventContext.Invalid /* parentBuildEventContext */, 229BuildEventContext.Invalid /* parentBuildEventContext */, 282BuildEventContext.Invalid /* parentBuildEventContext */, 297BuildEventContext.Invalid /* parentBuildEventContext */, 348BuildRequest request = new BuildRequest(1 /* submissionId */, 0, 1, new string[1] { "testTarget2" }, null, BuildEventContext.Invalid, null); 364var request1 = new BuildRequest(1, 2, 3, new[] { "target1" }, null, BuildEventContext.Invalid, null); 365var request2 = new BuildRequest(4, 5, 6, new[] { "target2" }, null, BuildEventContext.Invalid, null); 410var request1 = new BuildRequest(1, 2, 3, new[] { "target1" }, null, BuildEventContext.Invalid, null); 411var request2 = new BuildRequest(4, 5, 6, new[] { "target2" }, null, BuildEventContext.Invalid, null);
BackEnd\Scheduler_Tests.cs (1)
828BuildEventContext.Invalid,
BackEnd\SdkResolverService_Tests.cs (22)
43new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0, 0)); 55var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 98var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 115SdkResolverException e = Should.Throw<SdkResolverException>(() => service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true)); 130var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 145service.ResolveSdk(BuildEventContext.InvalidSubmissionId, 194var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 211var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 225var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 243service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 259var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 292const int submissionId = BuildEventContext.InvalidSubmissionId; 309const int submissionId = BuildEventContext.InvalidSubmissionId; 367var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 373result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, new SdkReference("foo", "2.0.0", null), _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 449var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 486var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 533var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 579var result = service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true); 626_ => service.ResolveSdk(BuildEventContext.InvalidSubmissionId, sdk, _loggingContext, new MockElementLocation("file"), "sln", "projectPath", interactive: false, isRunningInVisualStudio: false, failOnUnresolvedSdk: true)); 656BuildEventContext.InvalidSubmissionId, 687BuildEventContext.InvalidSubmissionId,
BackEnd\TargetBuilder_Tests.cs (1)
1562return new BuildRequest(1 /* submissionId */, _nodeRequestId++, configurationId, targets.Select(t => t.name).ToArray(), null, BuildEventContext.Invalid, null, flags);
BackEnd\TargetEntry_Tests.cs (1)
1015return new BuildRequest(1 /* submissionId */, _nodeRequestId++, configurationId, targets, null, BuildEventContext.Invalid, null);
BackEnd\TargetResult_Tests.cs (1)
93var buildEventContext = new Framework.BuildEventContext(1, 2, 3, 4, 5, 6, 7);
BackEnd\TargetUpToDateChecker_Tests.cs (1)
614TargetUpToDateChecker analyzer = new TargetUpToDateChecker(p, p.Targets["Build"], _mockHost, BuildEventContext.Invalid);
BackEnd\TaskExecutionHost_Tests.cs (3)
984TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)); 1012TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)); 1237TargetLoggingContext tlc = new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1));
BackEnd\TaskHost_Tests.cs (2)
75BuildRequest buildRequest = new BuildRequest(1 /* submissionId */, 1, 1, new List<string>(), null, BuildEventContext.Invalid, null); 88_taskHost.LoggingContext = new TaskLoggingContext(_loggingService, BuildEventContext.Invalid);
BackEnd\TaskRegistry_Tests.cs (2)
72private readonly BuildEventContext _loggerContext = new BuildEventContext(2, 2, 2, 2); 1247InvalidProjectFileException exception = Should.Throw<InvalidProjectFileException>(() => registry.GetRegisteredTask("Task1", "none", null, false, new TargetLoggingContext(_loggingService, new BuildEventContext(1, 1, BuildEventContext.InvalidProjectContextId, 1)), ElementLocation.Create("none", 1, 2)));
BuildEventArgsDataEnumeration.cs (3)
27BuildEventContext = BuildEventContext.Invalid, 54BuildEventContext = BuildEventContext.Invalid, 92BuildEventContext = BuildEventContext.Invalid,
BuildEventArgsSerialization_Tests.cs (7)
615desArgs.BuildEventContext.ShouldBe(BuildEventContext.Invalid); 750BuildEventContext = BuildEventContext.Invalid, 767BuildEventContext = BuildEventContext.Invalid, 790BuildEventContext = BuildEventContext.Invalid, 823BuildEventContext = BuildEventContext.Invalid, 846BuildEventContext = BuildEventContext.Invalid, 1191private string ToString(BuildEventContext context)
ConfigureableForwardingLogger_Tests.cs (1)
52BuildEventContext context = new BuildEventContext(1, 2, 3, 4);
ConsoleLogger_Tests.cs (17)
490BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 721BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 774BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 850BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 927BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 983BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 1058BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 1134BuildEventContext buildEventContext = new BuildEventContext(1, 2, 3, 4); 2135ProjectStartedEventArgs project1Started = new ProjectStartedEventArgs(1, null, null, "p", "t", null, null, new BuildEventContext(BuildEventContext.InvalidNodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId)); 2310BuildEventContext context = new BuildEventContext(1, 1, 1, 1); 2311BuildEventContext context2 = new BuildEventContext(2, 2, 2, 2); 2340BuildEventContext context = new BuildEventContext(1, 1, 1, 1); 2341BuildEventContext context2 = new BuildEventContext(2, 2, 2, 2); 2409BuildEventContext context = new BuildEventContext(1, 1, 1, 1);
Construction\SolutionFilter_Tests.cs (2)
31private static readonly BuildEventContext _buildEventContext = new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0);
Construction\SolutionProjectGenerator_Tests.cs (21)
39private static readonly BuildEventContext _buildEventContext = new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0); 1527ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1607ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1639ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1900ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 1957ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService()); 2038ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService()); 2307ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, collection.LoggingService); 2353ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "One" }); 2357instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "Two", "Three", "Four" }); 2363instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "Build" }); 2367instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "Five", "Rebuild" }); 2372instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new List<string> { "My_Project:Six" }); 2408ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), null); 2488instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService(), targetNames); 2495instances = SolutionProjectGenerator.Generate(solution, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "Foo" }); 2543ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "MyTarget" }).FirstOrDefault(); 2604ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, null, null, BuildEventContext.Invalid, CreateMockLoggingService(), targetsToBuild).FirstOrDefault(); 2721ProjectInstance projectInstance = SolutionProjectGenerator.Generate(solutionFile, globalProperties, null, BuildEventContext.Invalid, CreateMockLoggingService(), new[] { "Build" }).FirstOrDefault(); 2831ProjectInstance[] instances = SolutionProjectGenerator.Generate(solution, globalProperties, toolsVersion, BuildEventContext.Invalid, CreateMockLoggingService());
Definition\ToolsVersion_Tests.cs (10)
40LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 86LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 106LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 125LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 145LoggingContext loggingContext = new TestLoggingContext(service, new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 169LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4)); 195LoggingContext loggingContext = new TestLoggingContext(service, BuildEventContext.Invalid); 220LoggingContext loggingContext = new TestLoggingContext(service, BuildEventContext.Invalid); 241LoggingContext loggingContext = new TestLoggingContext(service, BuildEventContext.Invalid); 936LoggingContext loggingContext = TestLoggingContext.CreateTestContext(new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, 4));
Evaluation\EvaluationLogging_Tests.cs (2)
114evaluationId.ShouldNotBe(BuildEventContext.InvalidEvaluationId); 151eventEvaluationId.ShouldNotBe(BuildEventContext.InvalidEvaluationId);
Evaluation\Expander_Tests.cs (2)
5137new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0, 0)); 5174new BuildEventContext(0, 0, BuildEventContext.InvalidProjectContextId, 0, 0));
Graph\IsolateProjects_Tests.cs (6)
213logger.Errors.First().BuildEventContext.ShouldNotBe(BuildEventContext.Invalid); 215logger.Errors.First().BuildEventContext.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId); 216logger.Errors.First().BuildEventContext.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId); 217logger.Errors.First().BuildEventContext.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId); 218logger.Errors.First().BuildEventContext.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId); 219logger.Errors.First().BuildEventContext.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId);
Graph\ResultCacheBasedBuilds_Tests.cs (5)
400results["1"].Logger.Errors.First().BuildEventContext.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId); 401results["1"].Logger.Errors.First().BuildEventContext.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId); 402results["1"].Logger.Errors.First().BuildEventContext.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId); 403results["1"].Logger.Errors.First().BuildEventContext.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId); 404results["1"].Logger.Errors.First().BuildEventContext.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId);
Instance\ProjectInstance_Internal_Tests.cs (5)
772projectInstance.EvaluationId.ShouldNotBe(BuildEventContext.InvalidEvaluationId); 861BuildEventContext buildEventContext = new BuildEventContext(0, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId);
MockLoggingContext.cs (1)
16public MockLoggingContext(ILoggingService loggingService, BuildEventContext eventContext) : base(loggingService, eventContext)
TestLoggingContext.cs (2)
16public TestLoggingContext(ILoggingService? loggingService, BuildEventContext eventContext) : base( 22public static LoggingContext CreateTestContext(BuildEventContext buildEventContext)
Microsoft.Build.Framework (29)
BinaryReaderExtensions.cs (3)
70public static BuildEventContext? ReadOptionalBuildEventContext(this BinaryReader reader) 81public static BuildEventContext ReadBuildEventContext(this BinaryReader reader) 91var buildEventContext = new BuildEventContext(submissionId, nodeId, evaluationId, projectInstanceId, projectContextId, targetId, taskId);
BinaryTranslator.cs (2)
423public void Translate(ref BuildEventContext value) 1155public void Translate(ref BuildEventContext value)
BinaryWriterExtensions.cs (2)
74public static void WriteOptionalBuildEventContext(this BinaryWriter writer, BuildEventContext? context) 88public static void WriteBuildEventContext(this BinaryWriter writer, BuildEventContext context)
BuildEventArgs.cs (3)
57private BuildEventContext? buildEventContext; 172public BuildEventContext? BuildEventContext 276buildEventContext = BuildEventContext.Invalid;
BuildEventContext.cs (10)
118internal BuildEventContext WithInstanceIdAndContextId(int projectInstanceId, int projectContextId) 124internal BuildEventContext WithInstanceIdAndContextId(BuildEventContext other) 134public static BuildEventContext Invalid { get; } = new BuildEventContext(InvalidNodeId, InvalidTargetId, InvalidProjectContextId, InvalidTaskId); 259return InternalEquals((BuildEventContext)obj); 268public static bool operator ==(BuildEventContext? left, BuildEventContext? right) 290public static bool operator !=(BuildEventContext? left, BuildEventContext? right) 300private bool InternalEquals(BuildEventContext buildEventContext)
ITranslator.cs (1)
241void Translate(ref BuildEventContext value);
ProjectStartedEventArgs.cs (6)
85BuildEventContext? parentBuildEventContext) 112BuildEventContext? parentBuildEventContext, 169BuildEventContext? parentBuildEventContext, 196private BuildEventContext? parentProjectBuildEventContext; 201public BuildEventContext? ParentProjectBuildEventContext 532parentProjectBuildEventContext = BuildEventContext.Invalid;
TargetSkippedEventArgs.cs (2)
111/// <see cref="BuildEventContext"/> describing the original build of the target, or null if not available. 113public BuildEventContext OriginalBuildEventContext { get; set; }
Microsoft.Build.Framework.UnitTests (12)
EventArgs_Tests.cs (11)
62BuildEventContext parentBuildEventContext = new BuildEventContext(0, 0, 0, 0, 0, 0, 0); 64BuildEventContext currentBuildEventContext = new BuildEventContext(0, 1, 2, 3, 4, 5, 6); 66BuildEventContext currentBuildEventContextSubmission = new BuildEventContext(1, 0, 0, 0, 0, 0, 0); 67BuildEventContext currentBuildEventContextNode = new BuildEventContext(0, 1, 0, 0, 0, 0, 0); 68BuildEventContext currentBuildEventContextEvaluation = new BuildEventContext(0, 0, 1, 0, 0, 0, 0); 69BuildEventContext currentBuildEventContextProjectInstance = new BuildEventContext(0, 0, 0, 1, 0, 0, 0); 70BuildEventContext currentBuildEventProjectContext = new BuildEventContext(0, 0, 0, 0, 1, 0, 0); 71BuildEventContext currentBuildEventContextTarget = new BuildEventContext(0, 0, 0, 0, 0, 1, 0); 72BuildEventContext currentBuildEventContextTask = new BuildEventContext(0, 0, 0, 0, 0, 0, 1); 73BuildEventContext allDifferent = new BuildEventContext(1, 1, 1, 1, 1, 1, 1); 74BuildEventContext allSame = new BuildEventContext(0, 0, 0, 0, 0, 0, 0);
ProjectStartedEventArgs_Tests.cs (1)
30BuildEventContext parentBuildEventContext = new BuildEventContext(2, 3, 4, 5);
Microsoft.Build.Utilities.Core (4)
MuxLogger.cs (4)
370private BuildEventContext _firstProjectStartedEventContext; 678buildEvent.BuildEventContext.SubmissionId != BuildEventContext.InvalidSubmissionId)) 721buildEvent.BuildEventContext.SubmissionId != BuildEventContext.InvalidSubmissionId)) 1216buildEvent.BuildEventContext.SubmissionId == BuildEventContext.InvalidSubmissionId && eventIsErrorOrWarning)))
Microsoft.DotNet.ArcadeLogging (7)
PipelinesLogger.cs (7)
21private readonly Dictionary<BuildEventContext, Guid> _buildEventContextMap = new Dictionary<BuildEventContext, Guid>(BuildEventContextComparer.Instance); 82BuildEventContext buildEventContext) 408internal sealed class BuildEventContextComparer : IEqualityComparer<BuildEventContext> 412public bool Equals(BuildEventContext x, BuildEventContext y) => 417public int GetHashCode(BuildEventContext x) => x.ProjectContextId + (x.NodeId << 24);
MSBuild (11)
TerminalLogger\TerminalLogger.cs (11)
55public ProjectContext(BuildEventContext context) 525var buildEventContext = e.BuildEventContext; 556var buildEventContext = e.BuildEventContext; 729var buildEventContext = e.BuildEventContext; 761private void UpdateNodeStatus(BuildEventContext buildEventContext, NodeStatus? nodeStatus) 774var buildEventContext = e.BuildEventContext; 797var buildEventContext = e.BuildEventContext; 815var buildEventContext = e.BuildEventContext; 949BuildEventContext? buildEventContext = e.BuildEventContext; 991BuildEventContext? buildEventContext = e.BuildEventContext; 1124private int NodeIndexForContext(BuildEventContext context)