From 39c31dadfac814b521aaa5b018163a3e26752c6b Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 7 Apr 2026 15:21:02 +0200 Subject: [PATCH] feat(09-01): extend IStorageService with CollectFileTypeMetricsAsync - Add CollectFileTypeMetricsAsync method signature to IStorageService - Returns IReadOnlyList for chart visualization data - Existing CollectStorageAsync signature unchanged - CS0535 expected until StorageService implements in Plan 09-02 Co-Authored-By: Claude Opus 4.6 (1M context) --- SharepointToolbox/Services/IStorageService.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/SharepointToolbox/Services/IStorageService.cs b/SharepointToolbox/Services/IStorageService.cs index 16143d6..c538904 100644 --- a/SharepointToolbox/Services/IStorageService.cs +++ b/SharepointToolbox/Services/IStorageService.cs @@ -5,9 +5,25 @@ namespace SharepointToolbox.Services; public interface IStorageService { + /// + /// Collects storage metrics per library/folder using SharePoint StorageMetrics API. + /// Returns a tree of StorageNode objects with aggregate size data. + /// Task> CollectStorageAsync( ClientContext ctx, StorageScanOptions options, IProgress progress, CancellationToken ct); + + /// + /// Enumerates files across all non-hidden document libraries in the site + /// and aggregates storage consumption grouped by file extension. + /// Uses CSOM CamlQuery to retrieve FileLeafRef and File_x0020_Size per file. + /// This is a separate operation from CollectStorageAsync -- it provides + /// file-type breakdown data for chart visualization. + /// + Task> CollectFileTypeMetricsAsync( + ClientContext ctx, + IProgress progress, + CancellationToken ct); }