BuildReportBuilder Pennington.Generation
Mutable accumulator for a single static-build run that produces a finalized BuildReport.
Methods
AddBrokenLink
#public void AddBrokenLink(BrokenLink link);Records a broken link discovered by link verification.
Parameters
linkBrokenLink
AddDiagnostic
#public void AddDiagnostic(BuildDiagnostic diagnostic);Appends a pre-built diagnostic to the report.
Parameters
diagnosticBuildDiagnostic
AddError
#public void AddError(ContentRoute route, string message, Exception? exception = null);Records an error diagnostic for a route and marks the route as failed.
Parameters
routeContentRoutemessagestringexceptionException? (optional)
AddError
#public void AddError(string message, Exception? exception = null, string? sourceFile = null);Records an error diagnostic not tied to a specific route.
Parameters
messagestringexceptionException? (optional)sourceFilestring? (optional)
AddGeneratedPage
#public void AddGeneratedPage(ContentRoute route);Marks route as successfully generated.
Parameters
routeContentRoute
AddSkippedPage
#public void AddSkippedPage(ContentRoute route);Marks route as skipped (e.g. because it is a draft).
Parameters
routeContentRoute
AddWarning
#public void AddWarning(ContentRoute route, string message);Records a warning diagnostic attached to a specific route.
Parameters
routeContentRoutemessagestring
AddWarning
#public void AddWarning(string message, string? sourceFile = null);Records a warning diagnostic not tied to a specific route, optionally with a source file.
Parameters
messagestringsourceFilestring? (optional)
Build
#public BuildReport Build();Stops the timer and returns an immutable BuildReport for the run.
Returns
BuildReportPennington.Generation.BuildReportBuilder
namespace Pennington.Generation;
/// Mutable accumulator for a single static-build run that produces a finalized BuildReport.
public class BuildReportBuilder
{
/// Records a broken link discovered by link verification.
public void AddBrokenLink(BrokenLink link);
/// Appends a pre-built diagnostic to the report.
public void AddDiagnostic(BuildDiagnostic diagnostic);
/// Records an error diagnostic for a route and marks the route as failed.
public void AddError(ContentRoute route, string message, Exception? exception = null);
/// Records an error diagnostic not tied to a specific route.
public void AddError(string message, Exception? exception = null, string? sourceFile = null);
/// Marks route as successfully generated.
public void AddGeneratedPage(ContentRoute route);
/// Marks route as skipped (e.g. because it is a draft).
public void AddSkippedPage(ContentRoute route);
/// Records a warning diagnostic attached to a specific route.
public void AddWarning(ContentRoute route, string message);
/// Records a warning diagnostic not tied to a specific route, optionally with a source file.
public void AddWarning(string message, string? sourceFile = null);
/// Stops the timer and returns an immutable BuildReport for the run.
public BuildReport Build();
}