325 writes to BuildEventContext
Microsoft.Build (72)
BackEnd\BuildManager\BuildManager.cs (1)
1655
submissionStartedEvent.
BuildEventContext
= buildEventContext;
BackEnd\Components\Communications\LogMessagePacket.cs (2)
296
args.
BuildEventContext
= buildEventContext;
310
args.
BuildEventContext
= buildEventContext;
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
359
BuildEventContext
= new BuildEventContext(nodeId, BuildEventContext.InvalidTargetId, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidTaskId)
BackEnd\Components\Logging\LoggingContext.cs (1)
157
BuildEventContext
= _eventContext
BackEnd\Components\Logging\LoggingService.cs (4)
1625
BuildEventContext
= warningEvent.BuildEventContext,
1647
BuildEventContext
= warningEvent.BuildEventContext,
1670
BuildEventContext
= warningEvent.BuildEventContext,
1691
BuildEventContext
= warningEvent.BuildEventContext,
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (13)
174
buildEvent.
BuildEventContext
= buildEventContext;
326
buildEvent.
BuildEventContext
= buildEventContext;
433
BuildEventContext
= projectEvaluationEventContext,
463
BuildEventContext
= projectEvaluationEventContext,
594
buildEvent.
BuildEventContext
= projectBuildEventContext;
615
buildEvent.
BuildEventContext
= projectBuildEventContext;
663
buildEvent.
BuildEventContext
= targetBuildEventContext;
695
buildEvent.
BuildEventContext
= targetBuildEventContext;
721
buildEvent.
BuildEventContext
= taskBuildEventContext;
758
buildEvent.
BuildEventContext
= taskBuildEventContext;
789
buildEvent.
BuildEventContext
= taskBuildEventContext;
810
BuildEventContext
= buildEventContext,
831
responseFileUsedEvent.
BuildEventContext
= buildEventContext;
BackEnd\Components\Logging\NodeLoggingContext.cs (1)
112
BuildEventContext
= projectLoggingContext.BuildEventContext,
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (1)
146
buildArgs.
BuildEventContext
= _loggingContext.BuildEventContext;
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
306
args.
BuildEventContext
= buildEventContext;
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
575
BuildEventContext
= _projectLoggingContext.BuildEventContext,
BackEnd\Components\RequestBuilder\TargetEntry.cs (1)
385
BuildEventContext
= projectLoggingContext.BuildEventContext,
BackEnd\Components\RequestBuilder\TargetUpToDateChecker.cs (1)
240
BuildEventContext
= _buildEventContext,
BackEnd\Components\RequestBuilder\TaskHost.cs (5)
458
warningEvent.
BuildEventContext
= _taskLoggingContext.BuildEventContext;
466
e.
BuildEventContext
= _taskLoggingContext.BuildEventContext;
510
e.
BuildEventContext
= _taskLoggingContext.BuildEventContext;
551
e.
BuildEventContext
= _taskLoggingContext.BuildEventContext;
592
e.
BuildEventContext
= _taskLoggingContext.BuildEventContext;
BackEnd\Shared\EventsCreatorHelper.cs (3)
24
buildEvent.
BuildEventContext
= buildEventContext;
55
buildEvent.
BuildEventContext
= buildEventContext;
86
buildEvent.
BuildEventContext
= buildEventContext;
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (1)
167
{
BuildEventContext
= checkContext.BuildEventContext };
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (3)
121
eventArgs.
BuildEventContext
= checkContext.BuildEventContext!;
538
new(checkEventStats) {
BuildEventContext
= loggingContext.BuildEventContext };
652
deferredArgs.
BuildEventContext
= deferredArgs.BuildEventContext!.WithInstanceIdAndContextId(buildEventContext);
BuildCheck\Infrastructure\CheckWrapper.cs (1)
159
eventArgs.
BuildEventContext
= checkContext.BuildEventContext;
Construction\Solution\SolutionProjectGenerator.cs (1)
1105
BuildEventContext
= _projectBuildEventContext,
Definition\ProjectProperty.cs (2)
109
args.
BuildEventContext
= loggingContext.BuildEventContext;
128
args.
BuildEventContext
= loggingContext.BuildEventContext;
Evaluation\Evaluator.cs (7)
1723
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
1837
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
2041
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
2102
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
2243
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
2274
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
2329
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (6)
239
args.
BuildEventContext
= _evaluationLoggingContext.BuildEventContext;
257
BuildEventContext
= _evaluationLoggingContext.BuildEventContext,
315
{
BuildEventContext
= _evaluationLoggingContext.BuildEventContext, };
353
{
BuildEventContext
= _evaluationLoggingContext.BuildEventContext, };
475
{
BuildEventContext
= loggingContext.BuildEventContext };
495
{
BuildEventContext
= loggingContext.BuildEventContext, };
Instance\ProjectPropertyInstance.cs (2)
105
args.
BuildEventContext
= envProperty.loggingContext.BuildEventContext;
119
args.
BuildEventContext
= envProperty.loggingContext.BuildEventContext;
Instance\TaskFactoryEngineContext.cs (4)
212
e.
BuildEventContext
= _loggingContext.BuildEventContext;
233
e.
BuildEventContext
= _loggingContext.BuildEventContext;
254
e.
BuildEventContext
= _loggingContext.BuildEventContext;
275
e.
BuildEventContext
= _loggingContext.BuildEventContext;
Logging\BinaryLogger\BinaryLogger.cs (1)
480
args.
BuildEventContext
= BuildEventContext.Invalid;
Logging\BinaryLogger\BuildEventArgsReader.cs (6)
927
e.
BuildEventContext
= fields.BuildEventContext;
979
e.
BuildEventContext
= fields.BuildEventContext;
1033
e.
BuildEventContext
= fields.BuildEventContext;
1049
e.
BuildEventContext
= fields.BuildEventContext;
1126
e.
BuildEventContext
= fields.BuildEventContext;
1424
buildEventArgs.
BuildEventContext
= fields.BuildEventContext;
Logging\BinaryLogger\BuildEventArgsWriter.cs (1)
252
buildMessageEventArgs.
BuildEventContext
= e.BuildEventContext ?? BuildEventContext.Invalid;
TelemetryInfra\TelemetryCollectorProvider.cs (1)
76
{
BuildEventContext
= loggingContext.BuildEventContext };
Microsoft.Build.Engine.UnitTests (197)
BackEnd\EventSourceSink_Tests.cs (2)
759
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6)
787
BuildEventContext
= s_buildWarning.BuildEventContext
BackEnd\LoggingService_Tests.cs (2)
795
warningArgs.
BuildEventContext
= new BuildEventContext(1, 2, BuildEventContext.InvalidProjectContextId, BuildEventContext.InvalidProjectContextId, 5, 6);
992
buildEvent.
BuildEventContext
= projectStarted;
BackEnd\LoggingServicesLogMethod_Tests.cs (10)
1292
BuildEventContext
= buildEventContext,
1581
targetEvent.
BuildEventContext
= s_targetBuildEventContext;
1604
buildEvent.
BuildEventContext
= s_targetBuildEventContext;
1627
taskEvent.
BuildEventContext
= s_buildEventContext;
1649
taskEvent.
BuildEventContext
= s_buildEventContext;
1669
projectEvent.
BuildEventContext
= projectContext;
1694
buildEvent.
BuildEventContext
= generatedContext;
1713
buildMessageEvent.
BuildEventContext
= s_buildEventContext;
1740
buildEvent.
BuildEventContext
= s_buildEventContext;
1767
buildEvent.
BuildEventContext
= s_buildEventContext;
BackEnd\NodePackets_Tests.cs (9)
138
result.
BuildEventContext
= CreateBuildEventContext();
160
result.
BuildEventContext
= CreateBuildEventContext();
230
BuildEventContext
= CreateBuildEventContext(),
265
new EnvironmentVariableReadEventArgs("env", "message", "file", 0, 0) {
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6) },
297
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
303
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
309
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
315
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
321
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6, 7)
BuildEventArgsDataEnumeration.cs (3)
26
BuildEventContext
= BuildEventContext.Invalid,
53
BuildEventContext
= BuildEventContext.Invalid,
91
BuildEventContext
= BuildEventContext.Invalid,
BuildEventArgsSerialization_Tests.cs (14)
93
args.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6);
165
args.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4, 5, 6);
266
args.
BuildEventContext
= new BuildEventContext(4, 5, 6, 7);
346
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
419
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
495
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
583
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
678
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
750
BuildEventContext
= BuildEventContext.Invalid,
767
BuildEventContext
= BuildEventContext.Invalid,
796
BuildEventContext
= BuildEventContext.Invalid,
841
BuildEventContext
= BuildEventContext.Invalid,
874
BuildEventContext
= BuildEventContext.Invalid,
897
BuildEventContext
= BuildEventContext.Invalid,
ConfigureableForwardingLogger_Tests.cs (4)
53
_error.
BuildEventContext
= context;
54
_warning.
BuildEventContext
= context;
55
_targetStarted.
BuildEventContext
= context;
56
_targetFinished.
BuildEventContext
= context;
ConsoleLogger_Tests.cs (129)
460
es.Consume(new ProjectStartedEventArgs(1, null, null, "p", null, null, null, parentBuildEventContext: new BuildEventContext(1, 1, 1, 1)) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
461
es.Consume(new TargetStartedEventArgs(null, null, "t", null, null) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
462
es.Consume(new TaskStartedEventArgs(null, null, null, null, "task") {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
463
es.Consume(new BuildMessageEventArgs(null, null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
464
es.Consume(new BuildWarningEventArgs(null, null, null, 0, 0, 0, 0, null, null, null) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
465
es.Consume(new BuildErrorEventArgs(null, null, null, 0, 0, 0, 0, null, null, null) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
466
es.Consume(new TaskFinishedEventArgs(null, null, null, null, "task", true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
467
es.Consume(new TargetFinishedEventArgs(null, null, "t", null, null, true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
468
es.Consume(new ProjectFinishedEventArgs(null, null, "p", true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
469
es.Consume(new BuildFinishedEventArgs(null, null, true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
470
es.Consume(new BuildFinishedEventArgs(null, null, true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
471
es.Consume(new BuildFinishedEventArgs(null, null, true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
472
es.Consume(new MyCustomBuildEventArgs2() {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
488
bse.
BuildEventContext
= buildEventContext;
490
pse.
BuildEventContext
= buildEventContext;
492
trse.
BuildEventContext
= buildEventContext;
494
tase.
BuildEventContext
= buildEventContext;
496
bmea.
BuildEventContext
= buildEventContext;
498
bwea.
BuildEventContext
= buildEventContext;
500
beea.
BuildEventContext
= buildEventContext;
502
trfea.
BuildEventContext
= buildEventContext;
504
tafea.
BuildEventContext
= buildEventContext;
506
pfea.
BuildEventContext
= buildEventContext;
508
bfea.
BuildEventContext
= buildEventContext;
510
mcea.
BuildEventContext
= buildEventContext;
602
BuildEventContext
= new BuildEventContext(1, 2, 3, 4)
658
buildEventArgs.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
690
bse.
BuildEventContext
= buildEventContext;
694
pse.
BuildEventContext
= buildEventContext;
698
trse.
BuildEventContext
= buildEventContext;
702
tase.
BuildEventContext
= buildEventContext;
706
bmea.
BuildEventContext
= buildEventContext;
710
tafea.
BuildEventContext
= buildEventContext;
714
trfea.
BuildEventContext
= buildEventContext;
718
pfea.
BuildEventContext
= buildEventContext;
722
bfea.
BuildEventContext
= buildEventContext;
740
bse.
BuildEventContext
= buildEventContext;
744
pse.
BuildEventContext
= buildEventContext;
748
trse.
BuildEventContext
= buildEventContext;
752
tase.
BuildEventContext
= buildEventContext;
759
beea.
BuildEventContext
= buildEventContext;
763
tafea.
BuildEventContext
= buildEventContext;
767
trfea.
BuildEventContext
= buildEventContext;
771
pfea.
BuildEventContext
= buildEventContext;
775
bfea.
BuildEventContext
= buildEventContext;
801
bse.
BuildEventContext
= buildEventContext;
805
pse.
BuildEventContext
= buildEventContext;
809
trse.
BuildEventContext
= buildEventContext;
813
tase.
BuildEventContext
= buildEventContext;
821
beea.
BuildEventContext
= buildEventContext;
825
tafea.
BuildEventContext
= buildEventContext;
829
trfea.
BuildEventContext
= buildEventContext;
833
pfea.
BuildEventContext
= buildEventContext;
837
bfea.
BuildEventContext
= buildEventContext;
863
bse.
BuildEventContext
= buildEventContext;
867
pse.
BuildEventContext
= buildEventContext;
871
trse.
BuildEventContext
= buildEventContext;
875
tase.
BuildEventContext
= buildEventContext;
879
bmea.
BuildEventContext
= buildEventContext;
883
tafea.
BuildEventContext
= buildEventContext;
887
trfea.
BuildEventContext
= buildEventContext;
891
pfea.
BuildEventContext
= buildEventContext;
895
bfea.
BuildEventContext
= buildEventContext;
916
bse.
BuildEventContext
= buildEventContext;
920
pse.
BuildEventContext
= buildEventContext;
924
trse.
BuildEventContext
= buildEventContext;
928
tase.
BuildEventContext
= buildEventContext;
935
beea.
BuildEventContext
= buildEventContext;
939
tafea.
BuildEventContext
= buildEventContext;
943
trfea.
BuildEventContext
= buildEventContext;
947
pfea.
BuildEventContext
= buildEventContext;
951
bfea.
BuildEventContext
= buildEventContext;
976
bse.
BuildEventContext
= buildEventContext;
980
pse.
BuildEventContext
= buildEventContext;
984
trse.
BuildEventContext
= buildEventContext;
988
tase.
BuildEventContext
= buildEventContext;
996
beea.
BuildEventContext
= buildEventContext;
1000
tafea.
BuildEventContext
= buildEventContext;
1004
trfea.
BuildEventContext
= buildEventContext;
1008
pfea.
BuildEventContext
= buildEventContext;
1012
bfea.
BuildEventContext
= buildEventContext;
1037
bse.
BuildEventContext
= buildEventContext;
1041
pse.
BuildEventContext
= buildEventContext;
1045
trse.
BuildEventContext
= buildEventContext;
1049
tase.
BuildEventContext
= buildEventContext;
1057
beea.
BuildEventContext
= buildEventContext;
1061
tafea.
BuildEventContext
= buildEventContext;
1065
trfea.
BuildEventContext
= buildEventContext;
1069
pfea.
BuildEventContext
= buildEventContext;
1073
bfea.
BuildEventContext
= buildEventContext;
1093
c.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1111
c.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1126
c.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1149
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1370
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1427
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1447
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1553
bwea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1559
beea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1640
bwea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1646
beea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1723
project1Started.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1726
targetStarted1.
BuildEventContext
= project1Started.BuildEventContext;
1731
taskStarted1.
BuildEventContext
= project1Started.BuildEventContext;
1736
messsage1.
BuildEventContext
= project1Started.BuildEventContext;
1740
taskFinished1.
BuildEventContext
= project1Started.BuildEventContext;
1745
targetFinished1.
BuildEventContext
= project1Started.BuildEventContext;
1751
project2Started.
BuildEventContext
= new BuildEventContext(2, 2, 2, 2);
1754
targetStarted2.
BuildEventContext
= project2Started.BuildEventContext;
1759
taskStarted2.
BuildEventContext
= project2Started.BuildEventContext;
1764
messsage2.
BuildEventContext
= project2Started.BuildEventContext;
1768
taskFinished2.
BuildEventContext
= project2Started.BuildEventContext;
1773
targetFinished2.
BuildEventContext
= project2Started.BuildEventContext;
1778
finished2.
BuildEventContext
= project2Started.BuildEventContext;
1783
finished1.
BuildEventContext
= project1Started.BuildEventContext;
1836
messsage1.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1850
messsage2.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1864
messsage2.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1868
project.
BuildEventContext
= messsage1.BuildEventContext;
1900
project.
BuildEventContext
= context;
1904
targetStarted1.
BuildEventContext
= context;
1908
messsage1.
BuildEventContext
= context;
1930
project.
BuildEventContext
= context;
1934
project2.
BuildEventContext
= context2;
1938
targetStarted1.
BuildEventContext
= context;
1942
targetStarted2.
BuildEventContext
= context2;
1946
messsage1.
BuildEventContext
= context;
1948
messsage2.
BuildEventContext
= context2;
1950
messsage3.
BuildEventContext
= context;
FileLogger_Tests.cs (8)
61
SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
87
SetUpFileLoggerAndLogMessage("logfile=||invalid||", new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
114
fl.MessageHandler(null, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
216
SetUpFileLoggerAndLogMessage("encoding=utf-16;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
243
SetUpFileLoggerAndLogMessage("encoding=utf-8;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
293
SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
317
SetUpFileLoggerAndLogMessage("append;logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
342
SetUpFileLoggerAndLogMessage("logfile=" + log, new BuildMessageEventArgs("message here", null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
TerminalLogger_Tests.cs (16)
264
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
272
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
280
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
288
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
296
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
304
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
312
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
320
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
330
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
338
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
356
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
364
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
373
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
381
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
417
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
723
BuildEventContext
= new BuildEventContext(1, -1, -1, -1) // context that belongs to no project
Microsoft.Build.Framework (2)
AssemblyLoadBuildEventArgs.cs (1)
65
BuildEventContext
= reader.ReadOptionalBuildEventContext();
TaskParameterEventArgs.cs (1)
130
BuildEventContext
= reader.ReadOptionalBuildEventContext();
Microsoft.Build.Framework.UnitTests (54)
CustomEventArgSerialization_Tests.cs (47)
62
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
79
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
95
genericEvent.
BuildEventContext
= null;
104
newGenericEvent.
BuildEventContext
= new BuildEventContext(1, 3, 4, 5);
128
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
145
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
162
genericEvent.
BuildEventContext
= null;
179
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
213
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
228
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
243
genericEvent.
BuildEventContext
= null;
261
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
279
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
297
genericEvent.
BuildEventContext
= null;
331
messageEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
348
messageEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
365
messageEvent.
BuildEventContext
= null;
384
criticalMessageEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
402
criticalMessageEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
419
criticalMessageEvent.
BuildEventContext
= null;
438
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
455
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
472
genericEvent.
BuildEventContext
= null;
489
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
523
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
541
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
560
genericEvent.
BuildEventContext
= null;
590
genericEvent.
BuildEventContext
= new BuildEventContext(7, 8, 9, 10);
654
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
671
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
688
genericEvent.
BuildEventContext
= null;
721
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
739
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
757
genericEvent.
BuildEventContext
= null;
787
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
804
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
822
genericEvent.
BuildEventContext
= null;
851
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
868
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
886
genericEvent.
BuildEventContext
= null;
916
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
934
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
952
genericEvent.
BuildEventContext
= null;
984
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
997
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
1014
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
1027
genericEvent.
BuildEventContext
= new BuildEventContext(5, 4, 3, 2);
EventArgs_Tests.cs (2)
32
s_baseGenericEvent.
BuildEventContext
= new BuildEventContext(9, 8, 7, 6);
75
startedEvent.
BuildEventContext
= currentBuildEventContext;
ExtendedBuildEventArgs_Tests.cs (5)
29
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
67
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
106
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
144
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
181
BuildEventContext
= withOptionalData ? new BuildEventContext(1, 2, 3, 4, 5, 6, 7) : null,
309 references to BuildEventContext
Microsoft.Build (168)
BackEnd\BuildManager\BuildManager.cs (9)
1084
BuildResult result = _resultsCache!.GetResultsForConfiguration(projectStartedEvent.Value.
BuildEventContext
!.ProjectInstanceId);
2715
? buildEventArgs.
BuildEventContext
!
3123
if (_projectStartedEvents.TryGetValue(e.
BuildEventContext
!.SubmissionId, out var originalArgs))
3125
if (originalArgs.
BuildEventContext
!.Equals(e.
BuildEventContext
))
3127
_projectStartedEvents.Remove(e.
BuildEventContext
.SubmissionId);
3128
if (_buildSubmissions.TryGetValue(e.
BuildEventContext
.SubmissionId, out var submission))
3148
if (!_projectStartedEvents.ContainsKey(e.
BuildEventContext
!.SubmissionId))
3150
_projectStartedEvents[e.
BuildEventContext
.SubmissionId] = e;
BackEnd\Components\Communications\LogMessagePacket.cs (1)
114
var buildEventContext = args.
BuildEventContext
;
BackEnd\Components\Logging\LoggingService.cs (23)
1249
if ((warningEvent = buildEvent as BuildWarningEventArgs) != null && warningEvent.
BuildEventContext
!= null && warningEvent.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId)
1253
else if ((errorEvent = buildEvent as BuildErrorEventArgs) != null && errorEvent.
BuildEventContext
!= null && errorEvent.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId)
1257
else if ((messageEvent = buildEvent as BuildMessageEventArgs) != null && messageEvent.
BuildEventContext
!= null && messageEvent.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId)
1388
if (!_projectFileMap.ContainsKey(projectStartedEventArgs.
BuildEventContext
.ProjectContextId))
1390
_projectFileMap[projectStartedEventArgs.
BuildEventContext
.ProjectContextId] = projectStartedEventArgs.ProjectFile;
1406
return GetWarningsConfigKey(buildEventArgs.
BuildEventContext
);
1625
BuildEventContext = warningEvent.
BuildEventContext
,
1647
BuildEventContext = warningEvent.
BuildEventContext
,
1670
BuildEventContext = warningEvent.
BuildEventContext
,
1691
BuildEventContext = warningEvent.
BuildEventContext
,
1700
int submissionId = errorEvent.
BuildEventContext
?.SubmissionId ?? BuildEventContext.InvalidSubmissionId;
1718
AddWarningsAsErrors(projectStartedEvent.
BuildEventContext
, projectStartedEvent.WarningsAsErrors);
1719
AddWarningsAsMessages(projectStartedEvent.
BuildEventContext
, projectStartedEvent.WarningsAsMessages);
1720
AddWarningsNotAsErrors(projectStartedEvent.
BuildEventContext
, projectStartedEvent.WarningsNotAsErrors);
1723
if (buildEventArgs is ProjectFinishedEventArgs projectFinishedEvent && projectFinishedEvent.
BuildEventContext
!= null)
1984
BuildEventContext context = eventArgs.
BuildEventContext
!;
2012
if (_warningsAsMessagesByProject != null && warningEvent.
BuildEventContext
!= null && warningEvent.
BuildEventContext
.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId)
2049
if (_warningsAsErrorsByProject != null && warningEvent.
BuildEventContext
!= null && warningEvent.
BuildEventContext
.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId)
BackEnd\Components\Logging\LoggingServiceLogMethods.cs (1)
514
return args.
BuildEventContext
;
BackEnd\Components\Logging\ProjectLoggingContext.cs (2)
104
: base(nodeLoggingContext, projectStarted.
BuildEventContext
)
184
return args.
BuildEventContext
;
BuildCheck\Infrastructure\BuildCheckBuildEventHandler.cs (10)
76
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
79
_buildCheckManager.EndProjectEvaluation(eventArgs.
BuildEventContext
!);
87
var checkContext = _checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!);
102
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
107
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
120
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
125
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
130
_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!),
152
_buildCheckManager.ProcessBuildFinished(_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!));
182
private BuildEventContext GetBuildEventContext(BuildEventArgs e) => e.
BuildEventContext
BuildCheck\Infrastructure\BuildCheckManagerProvider.cs (6)
652
deferredArgs.BuildEventContext = deferredArgs.
BuildEventContext
!.WithInstanceIdAndContextId(buildEventContext);
683
eventArgs.
BuildEventContext
== null ||
685
eventArgs.
BuildEventContext
.EvaluationId == BuildEventContext.InvalidEvaluationId ||
687
eventArgs.
BuildEventContext
.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId ||
697
if (!_deferredEvalDiagnostics.TryGetValue(eventArgs.
BuildEventContext
.EvaluationId, out var list))
700
_deferredEvalDiagnostics[eventArgs.
BuildEventContext
.EvaluationId] = list;
BuildCheck\Infrastructure\BuildEventsProcessor.cs (9)
76
evaluationFinishedEventArgs.
BuildEventContext
?.ProjectInstanceId,
93
evaluationFinishedEventArgs.
BuildEventContext
?.ProjectInstanceId,
143
if (taskStartedEventArgs.
BuildEventContext
is not null)
159
projectConfigurationId: taskStartedEventArgs.
BuildEventContext
.ProjectInstanceId,
166
_tasksBeingExecuted.Add(new TaskKey(taskStartedEventArgs.
BuildEventContext
), taskData);
180
if (taskFinishedEventArgs?.
BuildEventContext
is not null)
182
TaskKey taskKey = new TaskKey(taskFinishedEventArgs.
BuildEventContext
);
210
if (taskParameterEventArgs.
BuildEventContext
is not null &&
211
_tasksBeingExecuted.TryGetValue(new TaskKey(taskParameterEventArgs.
BuildEventContext
), out ExecutingTaskData taskData))
BuildCheck\OM\ParsedItemsCheckData.cs (1)
66
: base(evaluationFinishedEventArgs.ProjectFile!, evaluationFinishedEventArgs.
BuildEventContext
?.ProjectInstanceId)
Logging\BinaryLogger\BuildEventArgsWriter.cs (3)
252
buildMessageEventArgs.BuildEventContext = e.
BuildEventContext
?? BuildEventContext.Invalid;
659
Write(e.
BuildEventContext
);
840
if (e.
BuildEventContext
!= null)
Logging\ParallelLogger\ParallelConsoleLogger.cs (81)
439
TargetStartedEventMinimumFields targetEvent = _buildEventManager.GetTargetStartedEvent(errorWarningEventArgs.
BuildEventContext
);
447
ErrorWarningSummaryDictionaryKey key = new ErrorWarningSummaryDictionaryKey(errorWarningEventArgs.
BuildEventContext
, targetName);
514
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
524
counter.AddEventStarted(e.TargetNames, e.
BuildEventContext
, e.Timestamp, s_compareContextNodeId);
528
if (_deferredMessages.TryGetValue(e.
BuildEventContext
, out var deferredMessages))
538
_deferredMessages.Remove(e.
BuildEventContext
);
548
DisplayDeferredProjectStartedEvent(e.
BuildEventContext
);
562
var projectKey = (e.
BuildEventContext
.NodeId, e.
BuildEventContext
.ProjectContextId);
576
var evaluationKey = GetEvaluationKey(e.
BuildEventContext
);
654
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
657
ProjectStartedEventMinimumFields startedEvent = _buildEventManager.GetProjectStartedEvent(e.
BuildEventContext
);
664
counter.AddEventFinished(startedEvent.TargetNames, e.
BuildEventContext
, e.Timestamp);
672
_lastProjectFullKey = GetFullProjectKey(e.
BuildEventContext
);
676
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
717
ShownBuildEventContext(e.
BuildEventContext
);
722
_buildEventManager.RemoveProjectStartedEvent(e.
BuildEventContext
);
749
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
751
ShownBuildEventContext(e.
BuildEventContext
);
816
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
818
ShownBuildEventContext(e.
BuildEventContext
);
845
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
855
counter.AddEventStarted(null, e.
BuildEventContext
, e.Timestamp, s_compareContextNodeIdTargetId);
866
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
872
counter.AddEventFinished(null, e.
BuildEventContext
, e.Timestamp);
878
DisplayDeferredTargetStartedEvent(e.
BuildEventContext
);
882
TargetStartedEventMinimumFields startedEvent = _buildEventManager.GetTargetStartedEvent(e.
BuildEventContext
);
909
_lastProjectFullKey = GetFullProjectKey(e.
BuildEventContext
);
910
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
914
WriteMessageAligned(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TargetMessageWithId", e.Message, e.
BuildEventContext
.TargetId), true);
923
ShownBuildEventContext(e.
BuildEventContext
);
928
_buildEventManager.RemoveTargetStartedEvent(e.
BuildEventContext
);
938
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
944
DisplayDeferredStartedEvents(e.
BuildEventContext
);
948
bool prefixAlreadyWritten = WriteTargetMessagePrefix(e, e.
BuildEventContext
, e.Timestamp);
952
WriteMessageAligned(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TaskMessageWithId", e.Message, e.
BuildEventContext
.TaskId), prefixAlreadyWritten);
961
ShownBuildEventContext(e.
BuildEventContext
);
968
counter.AddEventStarted(null, e.
BuildEventContext
, e.Timestamp, null);
979
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
984
counter.AddEventFinished(null, e.
BuildEventContext
, e.Timestamp);
992
bool prefixAlreadyWritten = WriteTargetMessagePrefix(e, e.
BuildEventContext
, e.Timestamp);
996
WriteMessageAligned(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TaskMessageWithId", e.Message, e.
BuildEventContext
.TaskId), prefixAlreadyWritten);
1004
ShownBuildEventContext(e.
BuildEventContext
);
1015
if (e.
BuildEventContext
!= null)
1017
var key = (e.
BuildEventContext
.NodeId, e.
BuildEventContext
.ProjectContextId);
1029
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
1036
_buildEventManager.SetErrorWarningFlagOnCallStack(e.
BuildEventContext
);
1038
TargetStartedEventMinimumFields targetStartedEvent = _buildEventManager.GetTargetStartedEvent(e.
BuildEventContext
);
1045
DisplayDeferredStartedEvents(e.
BuildEventContext
);
1053
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
1058
ShownBuildEventContext(e.
BuildEventContext
);
1075
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
1082
_buildEventManager.SetErrorWarningFlagOnCallStack(e.
BuildEventContext
);
1083
TargetStartedEventMinimumFields targetStartedEvent = _buildEventManager.GetTargetStartedEvent(e.
BuildEventContext
);
1091
DisplayDeferredStartedEvents(e.
BuildEventContext
);
1099
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
1106
ShownBuildEventContext(e.
BuildEventContext
);
1128
if (e.
BuildEventContext
== null && e is AssemblyLoadBuildEventArgs)
1133
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
1157
&& e.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId
1158
&& _buildEventManager.GetProjectStartedEvent(e.
BuildEventContext
) == null
1161
if (!_deferredMessages.TryGetValue(e.
BuildEventContext
, out List<BuildMessageEventArgs> messageList))
1164
_deferredMessages.Add(e.
BuildEventContext
, messageList);
1170
DisplayDeferredStartedEvents(e.
BuildEventContext
);
1174
ShownBuildEventContext(e.
BuildEventContext
);
1185
counter.AddEventStarted(null, e.
BuildEventContext
, e.Timestamp, s_compareContextNodeId);
1193
counter.AddEventFinished(null, e.
BuildEventContext
, e.Timestamp);
1212
var evaluationKey = GetEvaluationKey(e.
BuildEventContext
);
1270
if (e.
BuildEventContext
.TaskId != BuildEventContext.InvalidTaskId && e.File == null)
1283
if ((IsVerbosityAtLeast(LoggerVerbosity.Diagnostic) || _showEventId) && e.
BuildEventContext
.TaskId != BuildEventContext.InvalidTaskId)
1285
bool prefixAlreadyWritten = WriteTargetMessagePrefix(e, e.
BuildEventContext
, e.Timestamp);
1286
WriteMessageAligned(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TaskMessageWithId", nonNullMessage, e.
BuildEventContext
.TaskId), prefixAlreadyWritten, prefixAdjustment);
1293
bool prefixAlreadyWritten = WriteTargetMessagePrefix(e, e.
BuildEventContext
, e.Timestamp);
1313
BuildEventContext currentBuildEventContext = e.
BuildEventContext
;
1343
WriteMessageAligned(ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TargetMessageWithId", targetName, e.
BuildEventContext
.TargetId), prefixAlreadyWritten);
1365
ProjectFullKey currentProjectFullKey = GetFullProjectKey(e.
BuildEventContext
);
1563
ErrorUtilities.VerifyThrowArgumentNull(e.
BuildEventContext
, "BuildEventContext");
1570
DisplayDeferredStartedEvents(e.
BuildEventContext
);
1571
WriteLinePrefix(e.
BuildEventContext
, e.Timestamp, false);
1573
ShownBuildEventContext(e.
BuildEventContext
);
Logging\ParallelLogger\ParallelLoggerHelpers.cs (6)
47
if (!_projectStartedEvents.ContainsKey(e.
BuildEventContext
))
75
_projectStartedEvents.Add(e.
BuildEventContext
, new ProjectStartedEventMinimumFields(projectIncrementKeyLocal, projectTargetKeyLocal, e, parentEvent, requireTimestamp));
85
if (!_targetStartedEvents.ContainsKey(e.
BuildEventContext
))
87
_targetStartedEvents.Add(e.
BuildEventContext
, new TargetStartedEventMinimumFields(e, requireTimeStamp));
399
_buildEventContext = startedEvent.
BuildEventContext
;
520
_buildEventContext = startedEvent.
BuildEventContext
;
Logging\TerminalLogger\ForwardingTerminalLogger.cs (3)
98
if (e.
BuildEventContext
is not null && e.TaskName == MSBuildTaskName)
108
if (e.
BuildEventContext
is not null && e.TaskName == MSBuildTaskName)
116
if (e.
BuildEventContext
is null)
Logging\TerminalLogger\TerminalLogger.cs (13)
716
if (e.
BuildEventContext
is null)
721
ProjectContext c = new(e.
BuildEventContext
);
725
EvalContext evalContext = new(e.
BuildEventContext
);
748
int nodeIndex = NodeIndexForContext(e.
BuildEventContext
);
760
var buildEventContext = e.
BuildEventContext
;
878
var buildEventContext = evalFinish.
BuildEventContext
;
1037
var buildEventContext = e.
BuildEventContext
;
1103
var buildEventContext = e.
BuildEventContext
;
1141
var buildEventContext = e.
BuildEventContext
;
1159
var buildEventContext = e.
BuildEventContext
;
1178
var buildEventContext = e.
BuildEventContext
;
1338
BuildEventContext? buildEventContext = e.
BuildEventContext
;
1427
BuildEventContext? buildEventContext = e.
BuildEventContext
;
Microsoft.Build.Engine.UnitTests (48)
BackEnd\BuildManager_Tests.cs (1)
4010
Assert.True(_logger.AllBuildEvents.OfType<ProjectEvaluationStartedEventArgs>().GroupBy(args => args.
BuildEventContext
.EvaluationId).All(g => g.Count() == 1));
BackEnd\EventSourceSink_Tests.cs (1)
787
BuildEventContext = s_buildWarning.
BuildEventContext
BackEnd\LoggingService_Tests.cs (8)
748
Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.
BuildEventContext
, actualBuildEvent.
BuildEventContext
);
821
Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.
BuildEventContext
, actualBuildEvent.
BuildEventContext
);
886
Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.
BuildEventContext
, actualBuildEvent.
BuildEventContext
);
928
Assert.Equal(BuildWarningEventForTreatAsErrorOrMessageTests.
BuildEventContext
, actualBuildEvent.
BuildEventContext
);
BackEnd\LoggingServicesLogMethod_Tests.cs (2)
1300
Assert.Equal(expectedEventArgs.
BuildEventContext
, actualEventArgs.
BuildEventContext
);
BuildEventArgsSerialization_Tests.cs (7)
96
e => ToString(e.
BuildEventContext
),
168
e => ToString(e.
BuildEventContext
),
270
e => e.
BuildEventContext
.ToString());
609
desArgs.
BuildEventContext
.ShouldBe(args.
BuildEventContext
);
615
desArgs.
BuildEventContext
.ShouldBe(BuildEventContext.Invalid);
911
e => e.
BuildEventContext
.ToString(),
ConsoleLogger_Tests.cs (16)
609
message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TaskMessageWithId", "my 1337 message", be.
BuildEventContext
.TaskId);
1726
targetStarted1.BuildEventContext = project1Started.
BuildEventContext
;
1731
taskStarted1.BuildEventContext = project1Started.
BuildEventContext
;
1736
messsage1.BuildEventContext = project1Started.
BuildEventContext
;
1740
taskFinished1.BuildEventContext = project1Started.
BuildEventContext
;
1745
targetFinished1.BuildEventContext = project1Started.
BuildEventContext
;
1749
ProjectStartedEventArgs project2Started = new ProjectStartedEventArgs(2, null, null, "p2", "t2", null, null, project1Started.
BuildEventContext
);
1754
targetStarted2.BuildEventContext = project2Started.
BuildEventContext
;
1759
taskStarted2.BuildEventContext = project2Started.
BuildEventContext
;
1764
messsage2.BuildEventContext = project2Started.
BuildEventContext
;
1768
taskFinished2.BuildEventContext = project2Started.
BuildEventContext
;
1773
targetFinished2.BuildEventContext = project2Started.
BuildEventContext
;
1778
finished2.BuildEventContext = project2Started.
BuildEventContext
;
1783
finished1.BuildEventContext = project1Started.
BuildEventContext
;
1867
ProjectStartedEventArgs project = new ProjectStartedEventArgs(1, "Hello,", "HI", "None", "Build", null, null, messsage1.
BuildEventContext
);
1868
project.BuildEventContext = messsage1.
BuildEventContext
;
Evaluation\EvaluationLogging_Tests.cs (2)
118
buildEvent.
BuildEventContext
.EvaluationId.ShouldBe(evaluationId);
149
var eventEvaluationId = args.
BuildEventContext
.EvaluationId;
Graph\IsolateProjects_Tests.cs (6)
211
logger.Errors.First().
BuildEventContext
.ShouldNotBe(BuildEventContext.Invalid);
213
logger.Errors.First().
BuildEventContext
.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId);
214
logger.Errors.First().
BuildEventContext
.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId);
215
logger.Errors.First().
BuildEventContext
.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId);
216
logger.Errors.First().
BuildEventContext
.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId);
217
logger.Errors.First().
BuildEventContext
.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId);
Graph\ResultCacheBasedBuilds_Tests.cs (5)
398
results["1"].Logger.Errors.First().
BuildEventContext
.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId);
399
results["1"].Logger.Errors.First().
BuildEventContext
.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId);
400
results["1"].Logger.Errors.First().
BuildEventContext
.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId);
401
results["1"].Logger.Errors.First().
BuildEventContext
.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId);
402
results["1"].Logger.Errors.First().
BuildEventContext
.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId);
Microsoft.Build.Framework (2)
AssemblyLoadBuildEventArgs.cs (1)
51
writer.WriteOptionalBuildEventContext(
BuildEventContext
);
TaskParameterEventArgs.cs (1)
181
writer.WriteOptionalBuildEventContext(
BuildEventContext
);
Microsoft.Build.Framework.UnitTests (10)
CustomEventArgSerialization_Tests.cs (2)
115
newGenericEvent.
BuildEventContext
.ShouldBe(genericEvent.
BuildEventContext
); // "Expected Event Context to Match"
EventArgs_Tests.cs (8)
105
startedEvent.
BuildEventContext
.ShouldNotBeNull();
115
startedEvent.
BuildEventContext
.SubmissionId.ShouldBe(0);
116
startedEvent.
BuildEventContext
.NodeId.ShouldBe(1);
117
startedEvent.
BuildEventContext
.EvaluationId.ShouldBe(2);
118
startedEvent.
BuildEventContext
.ProjectInstanceId.ShouldBe(3);
119
startedEvent.
BuildEventContext
.ProjectContextId.ShouldBe(4);
120
startedEvent.
BuildEventContext
.TargetId.ShouldBe(5);
121
startedEvent.
BuildEventContext
.TaskId.ShouldBe(6);
Microsoft.Build.Tasks.UnitTests (2)
MSBuild_Tests.cs (2)
1477
var expectedTaskId = logger.TaskStartedEvents.First(t => t.TaskName == "MSBuild").
BuildEventContext
.TaskId;
1513
var expectedTaskId = logger.TaskStartedEvents.First(t => t.TaskName == nameof(BuildProjectFileTask)).
BuildEventContext
.TaskId;
Microsoft.Build.UnitTests.Shared (2)
BuildEventArgsExtension.cs (2)
48
if (args.
BuildEventContext
!= other.
BuildEventContext
)
Microsoft.Build.Utilities.Core (35)
MuxLogger.cs (35)
307
_submissionProjectsInProgress.TryGetValue(e.
BuildEventContext
.SubmissionId, out int value);
308
_submissionProjectsInProgress[e.
BuildEventContext
.SubmissionId] = value + 1;
316
int value = _submissionProjectsInProgress[e.
BuildEventContext
.SubmissionId];
320
_submissionProjectsInProgress.Remove(e.
BuildEventContext
.SubmissionId);
323
_submissionRecords.Remove(e.
BuildEventContext
.SubmissionId);
328
_submissionProjectsInProgress[e.
BuildEventContext
.SubmissionId] = value - 1;
633
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
675
buildEvent.
BuildEventContext
!= null &&
677
buildEvent.
BuildEventContext
.SubmissionId != _submissionId && /* The build submission does not match the submissionId for this logger */
678
buildEvent.
BuildEventContext
.SubmissionId != BuildEventContext.InvalidSubmissionId))
718
buildEvent.
BuildEventContext
!= null &&
720
buildEvent.
BuildEventContext
.SubmissionId != _submissionId && /* The build submission does not match the submissionId for this logger */
721
buildEvent.
BuildEventContext
.SubmissionId != BuildEventContext.InvalidSubmissionId))
850
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
859
_firstProjectStartedEventContext = buildEvent.
BuildEventContext
;
906
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
948
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
990
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
1032
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
1074
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
1116
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
1163
if (buildEvent.
BuildEventContext
!= null && buildEvent.
BuildEventContext
.SubmissionId != _submissionId)
1212
buildEvent.
BuildEventContext
!= null &&
1214
buildEvent.
BuildEventContext
.SubmissionId != _submissionId && /* The build submission does not match the submissionId for this logger */
1216
buildEvent.
BuildEventContext
.SubmissionId == BuildEventContext.InvalidSubmissionId && eventIsErrorOrWarning)))
1257
if (projectFinishedEvent != null && buildEvent.
BuildEventContext
?.Equals(_firstProjectStartedEventContext) == true)
Microsoft.DotNet.ArcadeLogging (5)
PipelinesLogger.cs (5)
195
LogErrorOrWarning(isError: true, e.File, e.LineNumber, e.ColumnNumber, e.Code, e.Message, e.
BuildEventContext
);
198
LogErrorOrWarning(isError: false, e.File, e.LineNumber, e.ColumnNumber, e.Code, e.Message, e.
BuildEventContext
);
207
if (!_buildEventContextMap.TryGetValue(e.
BuildEventContext
, out var parentId))
223
if (!_buildEventContextMap.TryGetValue(e.
BuildEventContext
, out Guid projectId) ||
256
_buildEventContextMap[e.
BuildEventContext
] = projectInfo.Id;
TaskUsageLogger (6)
TaskUsageLogger.cs (6)
117
GatherAndEvaluateTasksForProject(p, e.
BuildEventContext
.ProjectContextId);
122
_toolsVersionsByProjectContextId[e.
BuildEventContext
.ProjectContextId] = p.ToolsVersion;
155
_targetIdsToNames[e.
BuildEventContext
.TargetId] = e.TargetName;
169
_targetIdsToNames[e.
BuildEventContext
.TargetId],
172
GetAssemblySpecificationFor(e.TaskName, e.
BuildEventContext
.ProjectContextId, e.ProjectFile),
173
e.
BuildEventContext
.TaskId
XmlFileLogger (31)
ObjectModel\Build.cs (29)
77
var project = GetOrAddProject(targetStartedEventArgs.
BuildEventContext
.ProjectContextId);
88
var project = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId);
89
var target = project.GetTargetById(buildMessageEventArgs.
BuildEventContext
.TargetId);
90
var task = target.GetTaskById(buildMessageEventArgs.
BuildEventContext
.TaskId);
101
var project = GetOrAddProject(taskCommandLineEventArgs.
BuildEventContext
.ProjectContextId);
102
var target = project.GetTargetById(taskCommandLineEventArgs.
BuildEventContext
.TargetId);
103
var task = target.GetTaskById(taskCommandLineEventArgs.
BuildEventContext
.TaskId);
117
var project = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId);
118
var target = project.GetTargetById(buildMessageEventArgs.
BuildEventContext
.TargetId);
134
var project = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId);
135
var target = project.GetTargetById(buildMessageEventArgs.
BuildEventContext
.TargetId);
148
if (buildMessageEventArgs.
BuildEventContext
.TaskId > 0)
150
node = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId)
151
.GetTargetById(buildMessageEventArgs.
BuildEventContext
.TargetId)
152
.GetTaskById(buildMessageEventArgs.
BuildEventContext
.TaskId);
154
else if (buildMessageEventArgs.
BuildEventContext
.TargetId > 0)
156
node = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId)
157
.GetTargetById(buildMessageEventArgs.
BuildEventContext
.TargetId);
159
else if (buildMessageEventArgs.
BuildEventContext
.ProjectContextId > 0)
161
node = GetOrAddProject(buildMessageEventArgs.
BuildEventContext
.ProjectContextId);
173
var project = GetOrAddProject(taskStartedEventArgs.
BuildEventContext
.ProjectContextId);
174
var target = project.GetTargetById(taskStartedEventArgs.
BuildEventContext
.TargetId);
192
var project = GetOrAddProject(projectStartedEventArgs.
BuildEventContext
.ProjectContextId, projectStartedEventArgs, parent);
234
var project = GetOrAddProject(targetFinishedEventArgs.
BuildEventContext
.ProjectContextId);
235
var target = project.GetTargetById(targetFinishedEventArgs.
BuildEventContext
.TargetId);
246
var project = GetOrAddProject(projectFinishedEventArgs.
BuildEventContext
.ProjectContextId);
256
var project = GetOrAddProject(taskFinishedEventArgs.
BuildEventContext
.ProjectContextId);
257
var target = project.GetTargetById(taskFinishedEventArgs.
BuildEventContext
.TargetId);
258
var task = target.GetTaskById(taskFinishedEventArgs.
BuildEventContext
.TaskId);
ObjectModel\Target.cs (1)
108
Id = e.
BuildEventContext
.TargetId;
ObjectModel\Task.cs (1)
30
Id = taskStartedEvent.
BuildEventContext
.TaskId;