mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Statistics Collection / Writing Overhaul (#35)
* Add DatStatistics class * Add isDirectory setting * Add CalculateStatistics method (nw) * Add separate stats writing * Use new methods * Rename Write -> WriteIndividual * Naive implementation of new writing (nw) * Remove unncessary calls * Make writing more DatFile-like * Add console flag to constructor * Remove unused stream constructors * Move to local writers * Remove inherent filename * Fix invocation * Use SeparatedValueWriter * Fix final directory stats output * Use XmlTextWriter for HTML * Don't output separator on last stat output * Remove now-completed TODOs * Remove unused using
This commit is contained in:
30
SabreTools.Reports/DatStatistics.cs
Normal file
30
SabreTools.Reports/DatStatistics.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using SabreTools.DatFiles;
|
||||
|
||||
namespace SabreTools.Reports
|
||||
{
|
||||
/// <summary>
|
||||
/// Statistics wrapper for outputting
|
||||
/// </summary>
|
||||
public class DatStatistics
|
||||
{
|
||||
/// <summary>
|
||||
/// ItemDictionary representing the statistics
|
||||
/// </summary>
|
||||
public ItemDictionary Statistics { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name to display on output
|
||||
/// </summary>
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Total machine count to use on output
|
||||
/// </summary>
|
||||
public long MachineCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Determines if statistics are for a directory or not
|
||||
/// </summary>
|
||||
public bool IsDirectory { get; set; } = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user