Merge branch 'main' of https://git.azuze.fr/kawa/Sharepoint-Toolbox
This commit is contained in:
@@ -163,15 +163,27 @@ public partial class StorageViewModel : FeatureViewModelBase
|
||||
}
|
||||
|
||||
// ── Summary properties (computed from root-level library nodes) ─────────
|
||||
//
|
||||
// Recycle-bin contents are rolled into each library's TotalSizeBytes by the
|
||||
// StorageService (matches storman.aspx). Including the synthetic root-level
|
||||
// RecycleBin nodes here would double-count those bytes — filter them out.
|
||||
// SummaryRecycleBinSize below still reads from _allNodes so the bin metric
|
||||
// remains visible to the user.
|
||||
|
||||
/// <summary>Sum of TotalSizeBytes across root-level library nodes.</summary>
|
||||
public long SummaryTotalSize => Results.Where(n => n.IndentLevel == 0).Sum(n => n.TotalSizeBytes);
|
||||
/// <summary>Sum of TotalSizeBytes across root-level non-bin nodes.</summary>
|
||||
public long SummaryTotalSize => Results
|
||||
.Where(n => n.IndentLevel == 0 && n.Kind != StorageNodeKind.RecycleBin)
|
||||
.Sum(n => n.TotalSizeBytes);
|
||||
|
||||
/// <summary>Sum of VersionSizeBytes across root-level library nodes.</summary>
|
||||
public long SummaryVersionSize => Results.Where(n => n.IndentLevel == 0).Sum(n => n.VersionSizeBytes);
|
||||
/// <summary>Sum of VersionSizeBytes across root-level non-bin nodes.</summary>
|
||||
public long SummaryVersionSize => Results
|
||||
.Where(n => n.IndentLevel == 0 && n.Kind != StorageNodeKind.RecycleBin)
|
||||
.Sum(n => n.VersionSizeBytes);
|
||||
|
||||
/// <summary>Sum of TotalFileCount across root-level library nodes.</summary>
|
||||
public long SummaryFileCount => Results.Where(n => n.IndentLevel == 0).Sum(n => n.TotalFileCount);
|
||||
/// <summary>Sum of TotalFileCount across root-level non-bin nodes.</summary>
|
||||
public long SummaryFileCount => Results
|
||||
.Where(n => n.IndentLevel == 0 && n.Kind != StorageNodeKind.RecycleBin)
|
||||
.Sum(n => n.TotalFileCount);
|
||||
|
||||
/// <summary>
|
||||
/// Aggregate recycle-bin size (stage 1 + stage 2 across all sites). Reads
|
||||
|
||||
Reference in New Issue
Block a user