From aa12787a17a21e45f2d0191dbe3cf40ab73a857a Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 11 Sep 2008 11:39:43 +0000 Subject: * Added small convenience function to recursively calculate total amounts of items loaded under library inventory node --- .../Framework/Communications/Cache/InventoryFolderImpl.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'OpenSim/Framework/Communications/Cache') diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs index debcbfb..61343a0 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; + } + } } } -- cgit v1.1