Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
430 changes: 430 additions & 0 deletions src/Build/Logging/ProjectTrackingLoggerBase.cs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Build/Logging/TerminalLogger/StopwatchAbstraction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Microsoft.Build.Logging;

internal abstract class StopwatchAbstraction
public abstract class StopwatchAbstraction
{
public abstract void Start();
public abstract void Stop();
Expand Down
51 changes: 51 additions & 0 deletions src/Build/Logging/TerminalLogger/TerminalBuildData.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System;

namespace Microsoft.Build.Logging;

/// <summary>
/// Tracks build-level data for the TerminalLogger across an entire build session.
/// </summary>
public sealed class TerminalBuildData
{
/// <summary>
/// The timestamp of the build start event.
/// </summary>
public DateTime BuildStartTime { get; set; }

/// <summary>
/// Number of build errors encountered during the build.
/// </summary>
public int BuildErrorsCount { get; set; }

/// <summary>
/// Number of build warnings encountered during the build.
/// </summary>
public int BuildWarningsCount { get; set; }

/// <summary>
/// The project build context corresponding to the Restore initial target, or null if the build is currently not restoring.
/// </summary>
public int? RestoreContext { get; set; }

/// <summary>
/// True if restore failed and this failure has already been reported.
/// </summary>
public bool RestoreFailed { get; set; }

/// <summary>
/// True if restore happened and finished.
/// </summary>
public bool RestoreFinished { get; set; }

/// <summary>
/// Initializes a new instance of TerminalBuildData.
/// </summary>
/// <param name="buildStartTime">The timestamp when the build started.</param>
public TerminalBuildData(DateTime buildStartTime)
{
BuildStartTime = buildStartTime;
}
}
2 changes: 1 addition & 1 deletion src/Build/Logging/TerminalLogger/TerminalBuildMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ namespace Microsoft.Build.Logging;
/// <summary>
/// Represents a piece of diagnostic output (message/warning/error).
/// </summary>
internal record struct TerminalBuildMessage(TerminalMessageSeverity Severity, string Message)
public record struct TerminalBuildMessage(TerminalMessageSeverity Severity, string Message)
{ }
Loading