feat(09-01): add LiveCharts2 NuGet and FileTypeMetric data model
- Add LiveChartsCore.SkiaSharpView.WPF 2.0.0-rc5.4 package reference - Create FileTypeMetric record with Extension, TotalSizeBytes, FileCount - Include DisplayLabel computed property for chart label binding Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
21
SharepointToolbox/Core/Models/FileTypeMetric.cs
Normal file
21
SharepointToolbox/Core/Models/FileTypeMetric.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
namespace SharepointToolbox.Core.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents storage consumption for a single file extension across all scanned libraries.
|
||||||
|
/// Produced by IStorageService.CollectFileTypeMetricsAsync and consumed by chart bindings.
|
||||||
|
/// </summary>
|
||||||
|
public record FileTypeMetric(
|
||||||
|
/// <summary>File extension including dot, e.g. ".docx", ".pdf". Empty string for extensionless files.</summary>
|
||||||
|
string Extension,
|
||||||
|
/// <summary>Total size in bytes of all files with this extension.</summary>
|
||||||
|
long TotalSizeBytes,
|
||||||
|
/// <summary>Number of files with this extension.</summary>
|
||||||
|
int FileCount)
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Human-friendly display label: ".docx" becomes "DOCX", empty becomes "No Extension".
|
||||||
|
/// </summary>
|
||||||
|
public string DisplayLabel => string.IsNullOrEmpty(Extension)
|
||||||
|
? "No Extension"
|
||||||
|
: Extension.TrimStart('.').ToUpperInvariant();
|
||||||
|
}
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
|
||||||
<PackageReference Include="CsvHelper" Version="33.1.0" />
|
<PackageReference Include="CsvHelper" Version="33.1.0" />
|
||||||
|
<PackageReference Include="LiveChartsCore.SkiaSharpView.WPF" Version="2.0.0-rc5.4" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.0" />
|
||||||
<PackageReference Include="Microsoft.Graph" Version="5.74.0" />
|
<PackageReference Include="Microsoft.Graph" Version="5.74.0" />
|
||||||
<PackageReference Include="Microsoft.Identity.Client" Version="4.83.3" />
|
<PackageReference Include="Microsoft.Identity.Client" Version="4.83.3" />
|
||||||
|
|||||||
Reference in New Issue
Block a user