139 references to BinaryLogRecordKind
Microsoft.Build (129)
Logging\BinaryLogger\BinaryLogger.cs (3)
328
streamToEmbed => eventArgsWriter.WriteBlob(
BinaryLogRecordKind
.ProjectImportArchive, streamToEmbed),
342
stream.WriteByte((byte)
BinaryLogRecordKind
.EndOfFile);
349
private void RawEvents_LogDataSliceReceived(
BinaryLogRecordKind
recordKind, Stream stream)
Logging\BinaryLogger\BinaryLogReplayEventSource.cs (4)
26
event Action<
BinaryLogRecordKind
, Stream>? RawLogRecordReceived;
279
instance.RecordKind !=
BinaryLogRecordKind
.EndOfFile)
335
private Action<
BinaryLogRecordKind
, Stream>? _rawLogRecordReceived;
337
event Action<
BinaryLogRecordKind
, Stream>? IBinaryLogReplaySource.RawLogRecordReceived
Logging\BinaryLogger\BuildEventArgsReader.cs (55)
157
internal readonly record struct RawRecord(
BinaryLogRecordKind
RecordKind, Stream Stream);
179
BinaryLogRecordKind
recordKind = PreprocessRecordsTillNextEvent(IsTextualDataRecord);
181
if (recordKind ==
BinaryLogRecordKind
.EndOfFile)
218
BinaryLogRecordKind
recordKind = PreprocessRecordsTillNextEvent(IsAuxiliaryRecord);
220
if (recordKind ==
BinaryLogRecordKind
.EndOfFile)
260
BinaryLogRecordKind
localRecordKind = recordKind;
285
void HandleError(FormatErrorMessage msgFactory, bool noThrow, ReaderErrorType readerErrorType,
BinaryLogRecordKind
recordKind, Exception? innerException = null)
299
private BuildEventArgs? ReadBuildEventArgs(
BinaryLogRecordKind
recordKind)
302
BinaryLogRecordKind
.BuildStarted => ReadBuildStartedEventArgs(),
303
BinaryLogRecordKind
.BuildFinished => ReadBuildFinishedEventArgs(),
304
BinaryLogRecordKind
.BuildSubmissionStarted => ReadBuildSubmissionStartedEventArgs(),
305
BinaryLogRecordKind
.ProjectStarted => ReadProjectStartedEventArgs(),
306
BinaryLogRecordKind
.ProjectFinished => ReadProjectFinishedEventArgs(),
307
BinaryLogRecordKind
.TargetStarted => ReadTargetStartedEventArgs(),
308
BinaryLogRecordKind
.TargetFinished => ReadTargetFinishedEventArgs(),
309
BinaryLogRecordKind
.TaskStarted => ReadTaskStartedEventArgs(),
310
BinaryLogRecordKind
.TaskFinished => ReadTaskFinishedEventArgs(),
311
BinaryLogRecordKind
.Error => ReadBuildErrorEventArgs(),
312
BinaryLogRecordKind
.Warning => ReadBuildWarningEventArgs(),
313
BinaryLogRecordKind
.Message => ReadBuildMessageEventArgs(),
314
BinaryLogRecordKind
.CriticalBuildMessage => ReadCriticalBuildMessageEventArgs(),
315
BinaryLogRecordKind
.TaskCommandLine => ReadTaskCommandLineEventArgs(),
316
BinaryLogRecordKind
.TaskParameter => ReadTaskParameterEventArgs(),
317
BinaryLogRecordKind
.ProjectEvaluationStarted => ReadProjectEvaluationStartedEventArgs(),
318
BinaryLogRecordKind
.ProjectEvaluationFinished => ReadProjectEvaluationFinishedEventArgs(),
319
BinaryLogRecordKind
.ProjectImported => ReadProjectImportedEventArgs(),
320
BinaryLogRecordKind
.TargetSkipped => ReadTargetSkippedEventArgs(),
321
BinaryLogRecordKind
.EnvironmentVariableRead => ReadEnvironmentVariableReadEventArgs(),
322
BinaryLogRecordKind
.ResponseFileUsed => ReadResponseFileUsedEventArgs(),
323
BinaryLogRecordKind
.PropertyReassignment => ReadPropertyReassignmentEventArgs(),
324
BinaryLogRecordKind
.UninitializedPropertyRead => ReadUninitializedPropertyReadEventArgs(),
325
BinaryLogRecordKind
.PropertyInitialValueSet => ReadPropertyInitialValueSetEventArgs(),
326
BinaryLogRecordKind
.AssemblyLoad => ReadAssemblyLoadEventArgs(),
327
BinaryLogRecordKind
.BuildCheckMessage => ReadBuildMessageEventArgs(),
328
BinaryLogRecordKind
.BuildCheckWarning => ReadBuildWarningEventArgs(),
329
BinaryLogRecordKind
.BuildCheckError => ReadBuildErrorEventArgs(),
330
BinaryLogRecordKind
.BuildCheckTracing => ReadBuildCheckTracingEventArgs(),
331
BinaryLogRecordKind
.BuildCheckAcquisition => ReadBuildCheckAcquisitionEventArgs(),
332
BinaryLogRecordKind
.BuildCanceled => ReadBuildCanceledEventArgs(),
341
private
BinaryLogRecordKind
PreprocessRecordsTillNextEvent(Func<
BinaryLogRecordKind
, bool> isPreprocessRecord)
345
BinaryLogRecordKind
recordKind = (
BinaryLogRecordKind
)ReadInt32();
352
if (recordKind ==
BinaryLogRecordKind
.String)
356
else if (recordKind ==
BinaryLogRecordKind
.NameValueList)
361
else if (recordKind ==
BinaryLogRecordKind
.ProjectImportArchive)
368
recordKind = (
BinaryLogRecordKind
)ReadInt32();
374
private static bool IsAuxiliaryRecord(
BinaryLogRecordKind
recordKind)
376
return recordKind ==
BinaryLogRecordKind
.String
377
|| recordKind ==
BinaryLogRecordKind
.NameValueList
378
|| recordKind ==
BinaryLogRecordKind
.ProjectImportArchive;
381
private static bool IsTextualDataRecord(
BinaryLogRecordKind
recordKind)
383
return recordKind ==
BinaryLogRecordKind
.String
384
|| recordKind ==
BinaryLogRecordKind
.ProjectImportArchive;
387
private void ReadEmbeddedContent(
BinaryLogRecordKind
recordKind)
Logging\BinaryLogger\BuildEventArgsWriter.cs (63)
148
BinaryLogRecordKind
eventKind = WriteCore(e);
153
private void FlushRecordToFinalStream(
BinaryLogRecordKind
recordKind, MemoryStream recordStream)
203
private
BinaryLogRecordKind
WriteCore(BuildEventArgs e)
257
public void WriteBlob(
BinaryLogRecordKind
kind, Stream stream)
289
private
BinaryLogRecordKind
Write(BuildStartedEventArgs e)
301
return
BinaryLogRecordKind
.BuildStarted;
304
private
BinaryLogRecordKind
Write(BuildFinishedEventArgs e)
309
return
BinaryLogRecordKind
.BuildFinished;
312
private
BinaryLogRecordKind
Write(BuildCanceledEventArgs e)
316
return
BinaryLogRecordKind
.BuildCanceled;
319
private
BinaryLogRecordKind
Write(ProjectEvaluationStartedEventArgs e)
323
return
BinaryLogRecordKind
.ProjectEvaluationStarted;
326
private
BinaryLogRecordKind
Write(BuildCheckTracingEventArgs e)
335
return
BinaryLogRecordKind
.BuildCheckTracing;
338
private
BinaryLogRecordKind
Write(BuildCheckAcquisitionEventArgs e)
344
return
BinaryLogRecordKind
.BuildCheckAcquisition;
347
private
BinaryLogRecordKind
Write(ProjectEvaluationFinishedEventArgs e)
371
return
BinaryLogRecordKind
.ProjectEvaluationFinished;
374
private
BinaryLogRecordKind
Write(BuildSubmissionStartedEventArgs e)
383
return
BinaryLogRecordKind
.BuildSubmissionStarted;
386
private
BinaryLogRecordKind
Write(ProjectStartedEventArgs e)
412
return
BinaryLogRecordKind
.ProjectStarted;
415
private
BinaryLogRecordKind
Write(ProjectFinishedEventArgs e)
421
return
BinaryLogRecordKind
.ProjectFinished;
424
private
BinaryLogRecordKind
Write(TargetStartedEventArgs e)
433
return
BinaryLogRecordKind
.TargetStarted;
436
private
BinaryLogRecordKind
Write(TargetFinishedEventArgs e)
445
return
BinaryLogRecordKind
.TargetFinished;
448
private
BinaryLogRecordKind
Write(TaskStartedEventArgs e)
458
return
BinaryLogRecordKind
.TaskStarted;
461
private
BinaryLogRecordKind
Write(TaskFinishedEventArgs e)
469
return
BinaryLogRecordKind
.TaskFinished;
472
private
BinaryLogRecordKind
Write(BuildErrorEventArgs e)
485
return
BinaryLogRecordKind
.Error;
488
private
BinaryLogRecordKind
Write(BuildWarningEventArgs e)
501
return
BinaryLogRecordKind
.Warning;
504
private
BinaryLogRecordKind
Write(BuildMessageEventArgs e)
522
return
BinaryLogRecordKind
.Message;
526
private
BinaryLogRecordKind
Write(ProjectImportedEventArgs e)
532
return
BinaryLogRecordKind
.ProjectImported;
535
private
BinaryLogRecordKind
Write(TargetSkippedEventArgs e)
547
return
BinaryLogRecordKind
.TargetSkipped;
550
private
BinaryLogRecordKind
Write(AssemblyLoadBuildEventArgs e)
559
return
BinaryLogRecordKind
.AssemblyLoad;
562
private
BinaryLogRecordKind
Write(CriticalBuildMessageEventArgs e)
565
return
BinaryLogRecordKind
.CriticalBuildMessage;
568
private
BinaryLogRecordKind
Write(PropertyReassignmentEventArgs e)
575
return
BinaryLogRecordKind
.PropertyReassignment;
578
private
BinaryLogRecordKind
Write(UninitializedPropertyReadEventArgs e)
582
return
BinaryLogRecordKind
.UninitializedPropertyRead;
585
private
BinaryLogRecordKind
Write(PropertyInitialValueSetEventArgs e)
591
return
BinaryLogRecordKind
.PropertyInitialValueSet;
594
private
BinaryLogRecordKind
Write(EnvironmentVariableReadEventArgs e)
602
return
BinaryLogRecordKind
.EnvironmentVariableRead;
605
private
BinaryLogRecordKind
Write(ResponseFileUsedEventArgs e)
609
return
BinaryLogRecordKind
.ResponseFileUsed;
612
private
BinaryLogRecordKind
Write(TaskCommandLineEventArgs e)
617
return
BinaryLogRecordKind
.TaskCommandLine;
620
private
BinaryLogRecordKind
Write(TaskParameterEventArgs e)
633
return
BinaryLogRecordKind
.TaskParameter;
1158
FlushRecordToFinalStream(
BinaryLogRecordKind
.NameValueList, nameValueListStream);
1187
private void Write(
BinaryLogRecordKind
kind)
1273
Write(
BinaryLogRecordKind
.String);
Logging\BinaryLogger\Postprocessing\BinaryLogReaderErrorEventArgs.cs (2)
24
BinaryLogRecordKind
recordKind,
40
public
BinaryLogRecordKind
RecordKind { get; }
Logging\BinaryLogger\Postprocessing\EmbeddedContentEventArgs.cs (2)
11
public EmbeddedContentEventArgs(
BinaryLogRecordKind
contentKind, Stream contentStream)
17
public
BinaryLogRecordKind
ContentKind { get; }
Microsoft.Build.Engine.UnitTests (10)
BuildEventArgsSerialization_Tests.cs (10)
44
writer.WriteBlob(
BinaryLogRecordKind
.ProjectImportArchive, inputStream);
49
Assert.Equal(
BinaryLogRecordKind
.ProjectImportArchive, (
BinaryLogRecordKind
)binaryReader.Read7BitEncodedInt());
1015
readerErrors[0].RecordKind.ShouldBe(
BinaryLogRecordKind
.Error);
1051
BinaryLogRecordKind
unknownType = (
BinaryLogRecordKind
)Enum.GetValues(typeof(
BinaryLogRecordKind
)).Cast<
BinaryLogRecordKind
>().Select(e => (int)e).Max() + 2;
1126
readerErrors[0].RecordKind.ShouldBe(
BinaryLogRecordKind
.Error);
1182
readerErrors[0].RecordKind.ShouldBe(
BinaryLogRecordKind
.Error);