Fix access level for stats list in reports

This commit is contained in:
Matt Nadareski
2025-02-19 13:26:53 -05:00
parent 5f76596aa5
commit 9cbd2d8b04
4 changed files with 14 additions and 11 deletions

View File

@@ -18,7 +18,10 @@ namespace SabreTools.Reports
#endregion
public List<DatStatistics> Statistics { get; }
/// <summary>
/// Set of DatStatistics objects to use for formatting
/// </summary>
protected List<DatStatistics> _statistics;
/// <summary>
/// Create a new report from the filename
@@ -26,7 +29,7 @@ namespace SabreTools.Reports
/// <param name="statsList">List of statistics objects to set</param>
public BaseReport(List<DatStatistics> statsList)
{
Statistics = statsList;
_statistics = statsList;
}
/// <summary>

View File

@@ -54,10 +54,10 @@ namespace SabreTools.Reports.Formats
WriteHeader(xtw, baddumpCol, nodumpCol);
// Now process each of the statistics
for (int i = 0; i < Statistics.Count; i++)
for (int i = 0; i < _statistics.Count; i++)
{
// Get the current statistic
DatStatistics stat = Statistics[i];
DatStatistics stat = _statistics[i];
// If we have a directory statistic
if (stat.IsDirectory)
@@ -66,7 +66,7 @@ namespace SabreTools.Reports.Formats
WriteIndividual(xtw, stat, baddumpCol, nodumpCol);
// If we have anything but the last value, write the separator
if (i < Statistics.Count - 1)
if (i < _statistics.Count - 1)
{
WriteFooterSeparator(xtw, baddumpCol, nodumpCol);
WriteMidHeader(xtw, baddumpCol, nodumpCol);

View File

@@ -52,10 +52,10 @@ namespace SabreTools.Reports.Formats
WriteHeader(svw, baddumpCol, nodumpCol);
// Now process each of the statistics
for (int i = 0; i < Statistics.Count; i++)
for (int i = 0; i < _statistics.Count; i++)
{
// Get the current statistic
DatStatistics stat = Statistics[i];
DatStatistics stat = _statistics[i];
// If we have a directory statistic
if (stat.IsDirectory)
@@ -63,7 +63,7 @@ namespace SabreTools.Reports.Formats
WriteIndividual(svw, stat, baddumpCol, nodumpCol);
// If we have anything but the last value, write the separator
if (i < Statistics.Count - 1)
if (i < _statistics.Count - 1)
WriteFooterSeparator(svw);
}

View File

@@ -42,10 +42,10 @@ namespace SabreTools.Reports.Formats
StreamWriter sw = new(fs);
// Now process each of the statistics
for (int i = 0; i < Statistics.Count; i++)
for (int i = 0; i < _statistics.Count; i++)
{
// Get the current statistic
DatStatistics stat = Statistics[i];
DatStatistics stat = _statistics[i];
// If we have a directory statistic
if (stat.IsDirectory)
@@ -53,7 +53,7 @@ namespace SabreTools.Reports.Formats
WriteIndividual(sw, stat, baddumpCol, nodumpCol);
// If we have anything but the last value, write the separator
if (i < Statistics.Count - 1)
if (i < _statistics.Count - 1)
WriteFooterSeparator(sw);
}