From aa12787a17a21e45f2d0191dbe3cf40ab73a857a Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 11 Sep 2008 11:39:43 +0000 Subject: [PATCH] * Added small convenience function to recursively calculate total amounts of items loaded under library inventory node --- .../Communications/Cache/InventoryFolderImpl.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs index debcbfb10b..61343a024f 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs @@ -315,5 +315,20 @@ namespace OpenSim.Framework.Communications.Cache return folderList; } + + public int TotalCount + { + get + { + int total = Items.Count; + + foreach (InventoryFolderImpl folder in SubFolders.Values) + { + total = total + folder.TotalCount; + } + + return total; + } + } } }