324 writes to BuildEventContext
Microsoft.Build (72)
BackEnd\BuildManager\BuildManager.cs (1)
1470
submissionStartedEvent.
BuildEventContext
= buildEventContext;
BackEnd\Components\Communications\LogMessagePacket.cs (2)
296
args.
BuildEventContext
= buildEventContext;
310
args.
BuildEventContext
= buildEventContext;
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (1)
294
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)
1573
BuildEventContext
= warningEvent.BuildEventContext,
1595
BuildEventContext
= warningEvent.BuildEventContext,
1618
BuildEventContext
= warningEvent.BuildEventContext,
1639
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)
107
BuildEventContext
= projectLoggingContext.BuildEventContext,
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (1)
168
buildArgs.
BuildEventContext
= _loggingContext.BuildEventContext;
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
306
args.
BuildEventContext
= buildEventContext;
BackEnd\Components\RequestBuilder\TargetBuilder.cs (1)
571
BuildEventContext
= _projectLoggingContext.BuildEventContext,
BackEnd\Components\RequestBuilder\TargetEntry.cs (1)
384
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)
169
{
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)
1058
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)
309
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\TelemetryForwarderProvider.cs (1)
77
{
BuildEventContext
= loggingContext.BuildEventContext };
Microsoft.Build.Engine.UnitTests (196)
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 (13)
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,
790
BuildEventContext
= BuildEventContext.Invalid,
823
BuildEventContext
= BuildEventContext.Invalid,
846
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)
461
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) });
462
es.Consume(new TargetStartedEventArgs(null, null, "t", null, null) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
463
es.Consume(new TaskStartedEventArgs(null, null, null, null, "task") {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
464
es.Consume(new BuildMessageEventArgs(null, null, null, MessageImportance.High) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
465
es.Consume(new BuildWarningEventArgs(null, null, null, 0, 0, 0, 0, null, null, null) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
466
es.Consume(new BuildErrorEventArgs(null, null, null, 0, 0, 0, 0, null, null, null) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
467
es.Consume(new TaskFinishedEventArgs(null, null, null, null, "task", true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
468
es.Consume(new TargetFinishedEventArgs(null, null, "t", null, null, true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
469
es.Consume(new ProjectFinishedEventArgs(null, null, "p", 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 BuildFinishedEventArgs(null, null, true) {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
473
es.Consume(new MyCustomBuildEventArgs2() {
BuildEventContext
= new BuildEventContext(1, 1, 1, 1) });
489
bse.
BuildEventContext
= buildEventContext;
491
pse.
BuildEventContext
= buildEventContext;
493
trse.
BuildEventContext
= buildEventContext;
495
tase.
BuildEventContext
= buildEventContext;
497
bmea.
BuildEventContext
= buildEventContext;
499
bwea.
BuildEventContext
= buildEventContext;
501
beea.
BuildEventContext
= buildEventContext;
503
trfea.
BuildEventContext
= buildEventContext;
505
tafea.
BuildEventContext
= buildEventContext;
507
pfea.
BuildEventContext
= buildEventContext;
509
bfea.
BuildEventContext
= buildEventContext;
511
mcea.
BuildEventContext
= buildEventContext;
603
BuildEventContext
= new BuildEventContext(1, 2, 3, 4)
659
buildEventArgs.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
691
bse.
BuildEventContext
= buildEventContext;
695
pse.
BuildEventContext
= buildEventContext;
699
trse.
BuildEventContext
= buildEventContext;
703
tase.
BuildEventContext
= buildEventContext;
707
bmea.
BuildEventContext
= buildEventContext;
711
tafea.
BuildEventContext
= buildEventContext;
715
trfea.
BuildEventContext
= buildEventContext;
719
pfea.
BuildEventContext
= buildEventContext;
723
bfea.
BuildEventContext
= buildEventContext;
741
bse.
BuildEventContext
= buildEventContext;
745
pse.
BuildEventContext
= buildEventContext;
749
trse.
BuildEventContext
= buildEventContext;
753
tase.
BuildEventContext
= buildEventContext;
760
beea.
BuildEventContext
= buildEventContext;
764
tafea.
BuildEventContext
= buildEventContext;
768
trfea.
BuildEventContext
= buildEventContext;
772
pfea.
BuildEventContext
= buildEventContext;
776
bfea.
BuildEventContext
= buildEventContext;
802
bse.
BuildEventContext
= buildEventContext;
806
pse.
BuildEventContext
= buildEventContext;
810
trse.
BuildEventContext
= buildEventContext;
814
tase.
BuildEventContext
= buildEventContext;
822
beea.
BuildEventContext
= buildEventContext;
826
tafea.
BuildEventContext
= buildEventContext;
830
trfea.
BuildEventContext
= buildEventContext;
834
pfea.
BuildEventContext
= buildEventContext;
838
bfea.
BuildEventContext
= buildEventContext;
864
bse.
BuildEventContext
= buildEventContext;
868
pse.
BuildEventContext
= buildEventContext;
872
trse.
BuildEventContext
= buildEventContext;
876
tase.
BuildEventContext
= buildEventContext;
880
bmea.
BuildEventContext
= buildEventContext;
884
tafea.
BuildEventContext
= buildEventContext;
888
trfea.
BuildEventContext
= buildEventContext;
892
pfea.
BuildEventContext
= buildEventContext;
896
bfea.
BuildEventContext
= buildEventContext;
917
bse.
BuildEventContext
= buildEventContext;
921
pse.
BuildEventContext
= buildEventContext;
925
trse.
BuildEventContext
= buildEventContext;
929
tase.
BuildEventContext
= buildEventContext;
936
beea.
BuildEventContext
= buildEventContext;
940
tafea.
BuildEventContext
= buildEventContext;
944
trfea.
BuildEventContext
= buildEventContext;
948
pfea.
BuildEventContext
= buildEventContext;
952
bfea.
BuildEventContext
= buildEventContext;
977
bse.
BuildEventContext
= buildEventContext;
981
pse.
BuildEventContext
= buildEventContext;
985
trse.
BuildEventContext
= buildEventContext;
989
tase.
BuildEventContext
= buildEventContext;
997
beea.
BuildEventContext
= buildEventContext;
1001
tafea.
BuildEventContext
= buildEventContext;
1005
trfea.
BuildEventContext
= buildEventContext;
1009
pfea.
BuildEventContext
= buildEventContext;
1013
bfea.
BuildEventContext
= buildEventContext;
1038
bse.
BuildEventContext
= buildEventContext;
1042
pse.
BuildEventContext
= buildEventContext;
1046
trse.
BuildEventContext
= buildEventContext;
1050
tase.
BuildEventContext
= buildEventContext;
1058
beea.
BuildEventContext
= buildEventContext;
1062
tafea.
BuildEventContext
= buildEventContext;
1066
trfea.
BuildEventContext
= buildEventContext;
1070
pfea.
BuildEventContext
= buildEventContext;
1074
bfea.
BuildEventContext
= buildEventContext;
1094
c.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1112
c.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1127
c.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1150
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1355
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1412
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1432
buildEvent.
BuildEventContext
= new BuildEventContext(1, 2, 3, 4);
1538
bwea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1544
beea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1625
bwea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1631
beea.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1708
project1Started.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1711
targetStarted1.
BuildEventContext
= project1Started.BuildEventContext;
1716
taskStarted1.
BuildEventContext
= project1Started.BuildEventContext;
1721
messsage1.
BuildEventContext
= project1Started.BuildEventContext;
1725
taskFinished1.
BuildEventContext
= project1Started.BuildEventContext;
1730
targetFinished1.
BuildEventContext
= project1Started.BuildEventContext;
1736
project2Started.
BuildEventContext
= new BuildEventContext(2, 2, 2, 2);
1739
targetStarted2.
BuildEventContext
= project2Started.BuildEventContext;
1744
taskStarted2.
BuildEventContext
= project2Started.BuildEventContext;
1749
messsage2.
BuildEventContext
= project2Started.BuildEventContext;
1753
taskFinished2.
BuildEventContext
= project2Started.BuildEventContext;
1758
targetFinished2.
BuildEventContext
= project2Started.BuildEventContext;
1763
finished2.
BuildEventContext
= project2Started.BuildEventContext;
1768
finished1.
BuildEventContext
= project1Started.BuildEventContext;
1821
messsage1.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1835
messsage2.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1849
messsage2.
BuildEventContext
= new BuildEventContext(1, 1, 1, 1);
1853
project.
BuildEventContext
= messsage1.BuildEventContext;
1885
project.
BuildEventContext
= context;
1889
targetStarted1.
BuildEventContext
= context;
1893
messsage1.
BuildEventContext
= context;
1915
project.
BuildEventContext
= context;
1919
project2.
BuildEventContext
= context2;
1923
targetStarted1.
BuildEventContext
= context;
1927
targetStarted2.
BuildEventContext
= context2;
1931
messsage1.
BuildEventContext
= context;
1933
messsage2.
BuildEventContext
= context2;
1935
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)
193
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
201
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
209
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
217
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
225
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
233
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
241
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
249
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
259
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
267
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
285
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
293
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
302
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
310
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
346
BuildEventContext
= buildEventContext ?? MakeBuildEventContext(),
650
BuildEventContext
= new BuildEventContext(1, -1, -1, -1) // context that belongs to no project
Microsoft.Build.Framework (2)
AssemblyLoadBuildEventArgs.cs (1)
66
BuildEventContext
= reader.ReadOptionalBuildEventContext();
TaskParameterEventArgs.cs (1)
131
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,
307 references to BuildEventContext
Microsoft.Build (166)
BackEnd\BuildManager\BuildManager.cs (9)
1049
BuildResult result = _resultsCache!.GetResultsForConfiguration(projectStartedEvent.Value.
BuildEventContext
!.ProjectInstanceId);
2523
? buildEventArgs.
BuildEventContext
!
2933
if (_projectStartedEvents.TryGetValue(e.
BuildEventContext
!.SubmissionId, out var originalArgs))
2935
if (originalArgs.
BuildEventContext
!.Equals(e.
BuildEventContext
))
2937
_projectStartedEvents.Remove(e.
BuildEventContext
.SubmissionId);
2938
if (_buildSubmissions.TryGetValue(e.
BuildEventContext
.SubmissionId, out var submission))
2958
if (!_projectStartedEvents.ContainsKey(e.
BuildEventContext
!.SubmissionId))
2960
_projectStartedEvents[e.
BuildEventContext
.SubmissionId] = e;
BackEnd\Components\Communications\LogMessagePacket.cs (1)
114
var buildEventContext = args.
BuildEventContext
;
BackEnd\Components\Logging\LoggingService.cs (23)
1227
if ((warningEvent = buildEvent as BuildWarningEventArgs) != null && warningEvent.
BuildEventContext
!= null && warningEvent.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId)
1231
else if ((errorEvent = buildEvent as BuildErrorEventArgs) != null && errorEvent.
BuildEventContext
!= null && errorEvent.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId)
1235
else if ((messageEvent = buildEvent as BuildMessageEventArgs) != null && messageEvent.
BuildEventContext
!= null && messageEvent.
BuildEventContext
.ProjectContextId != BuildEventContext.InvalidProjectContextId)
1336
if (!_projectFileMap.ContainsKey(projectStartedEventArgs.
BuildEventContext
.ProjectContextId))
1338
_projectFileMap[projectStartedEventArgs.
BuildEventContext
.ProjectContextId] = projectStartedEventArgs.ProjectFile;
1354
return GetWarningsConfigKey(buildEventArgs.
BuildEventContext
);
1573
BuildEventContext = warningEvent.
BuildEventContext
,
1595
BuildEventContext = warningEvent.
BuildEventContext
,
1618
BuildEventContext = warningEvent.
BuildEventContext
,
1639
BuildEventContext = warningEvent.
BuildEventContext
,
1648
int submissionId = errorEvent.
BuildEventContext
?.SubmissionId ?? BuildEventContext.InvalidSubmissionId;
1664
AddWarningsAsErrors(projectStartedEvent.
BuildEventContext
, projectStartedEvent.WarningsAsErrors);
1665
AddWarningsAsMessages(projectStartedEvent.
BuildEventContext
, projectStartedEvent.WarningsAsMessages);
1666
AddWarningsNotAsErrors(projectStartedEvent.
BuildEventContext
, projectStartedEvent.WarningsNotAsErrors);
1669
if (buildEventArgs is ProjectFinishedEventArgs projectFinishedEvent && projectFinishedEvent.
BuildEventContext
!= null)
1925
BuildEventContext context = eventArgs.
BuildEventContext
!;
1953
if (_warningsAsMessagesByProject != null && warningEvent.
BuildEventContext
!= null && warningEvent.
BuildEventContext
.ProjectInstanceId != BuildEventContext.InvalidProjectInstanceId)
1990
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
!),
154
_buildCheckManager.ProcessBuildFinished(_checkContextFactory.CreateCheckContext(eventArgs.
BuildEventContext
!));
184
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 (2)
96
if (e.
BuildEventContext
is not null && e.TaskName == "MSBuild")
104
if (e.
BuildEventContext
is null)
Logging\TerminalLogger\TerminalLogger.cs (12)
641
if (e.
BuildEventContext
is null)
646
ProjectContext c = new(e.
BuildEventContext
);
650
EvalContext evalContext = new(e.
BuildEventContext
);
667
int nodeIndex = NodeIndexForContext(e.
BuildEventContext
);
678
var buildEventContext = e.
BuildEventContext
;
790
var buildEventContext = evalFinish.
BuildEventContext
;
949
var buildEventContext = e.
BuildEventContext
;
994
var buildEventContext = e.
BuildEventContext
;
1032
var buildEventContext = e.
BuildEventContext
;
1050
var buildEventContext = e.
BuildEventContext
;
1202
BuildEventContext? buildEventContext = e.
BuildEventContext
;
1294
BuildEventContext? buildEventContext = e.
BuildEventContext
;
Microsoft.Build.Engine.UnitTests (48)
BackEnd\BuildManager_Tests.cs (1)
3966
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);
860
e => e.
BuildEventContext
.ToString(),
ConsoleLogger_Tests.cs (16)
610
message = ResourceUtilities.FormatResourceStringStripCodeAndKeyword("TaskMessageWithId", "my 1337 message", be.
BuildEventContext
.TaskId);
1711
targetStarted1.BuildEventContext = project1Started.
BuildEventContext
;
1716
taskStarted1.BuildEventContext = project1Started.
BuildEventContext
;
1721
messsage1.BuildEventContext = project1Started.
BuildEventContext
;
1725
taskFinished1.BuildEventContext = project1Started.
BuildEventContext
;
1730
targetFinished1.BuildEventContext = project1Started.
BuildEventContext
;
1734
ProjectStartedEventArgs project2Started = new ProjectStartedEventArgs(2, null, null, "p2", "t2", null, null, project1Started.
BuildEventContext
);
1739
targetStarted2.BuildEventContext = project2Started.
BuildEventContext
;
1744
taskStarted2.BuildEventContext = project2Started.
BuildEventContext
;
1749
messsage2.BuildEventContext = project2Started.
BuildEventContext
;
1753
taskFinished2.BuildEventContext = project2Started.
BuildEventContext
;
1758
targetFinished2.BuildEventContext = project2Started.
BuildEventContext
;
1763
finished2.BuildEventContext = project2Started.
BuildEventContext
;
1768
finished1.BuildEventContext = project1Started.
BuildEventContext
;
1852
ProjectStartedEventArgs project = new ProjectStartedEventArgs(1, "Hello,", "HI", "None", "Build", null, null, messsage1.
BuildEventContext
);
1853
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)
212
logger.Errors.First().
BuildEventContext
.ShouldNotBe(BuildEventContext.Invalid);
214
logger.Errors.First().
BuildEventContext
.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId);
215
logger.Errors.First().
BuildEventContext
.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId);
216
logger.Errors.First().
BuildEventContext
.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId);
217
logger.Errors.First().
BuildEventContext
.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId);
218
logger.Errors.First().
BuildEventContext
.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId);
Graph\ResultCacheBasedBuilds_Tests.cs (5)
399
results["1"].Logger.Errors.First().
BuildEventContext
.NodeId.ShouldNotBe(BuildEventContext.InvalidNodeId);
400
results["1"].Logger.Errors.First().
BuildEventContext
.ProjectInstanceId.ShouldNotBe(BuildEventContext.InvalidProjectInstanceId);
401
results["1"].Logger.Errors.First().
BuildEventContext
.ProjectContextId.ShouldNotBe(BuildEventContext.InvalidProjectContextId);
402
results["1"].Logger.Errors.First().
BuildEventContext
.TargetId.ShouldNotBe(BuildEventContext.InvalidTargetId);
403
results["1"].Logger.Errors.First().
BuildEventContext
.TaskId.ShouldNotBe(BuildEventContext.InvalidTaskId);
Microsoft.Build.Framework (2)
AssemblyLoadBuildEventArgs.cs (1)
52
writer.WriteOptionalBuildEventContext(
BuildEventContext
);
TaskParameterEventArgs.cs (1)
182
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)
1478
var expectedTaskId = logger.TaskStartedEvents.First(t => t.TaskName == "MSBuild").
BuildEventContext
.TaskId;
1514
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;