diff options
author | lbsa71 | 2008-09-11 11:39:43 +0000 |
---|---|---|
committer | lbsa71 | 2008-09-11 11:39:43 +0000 |
commit | aa12787a17a21e45f2d0191dbe3cf40ab73a857a (patch) | |
tree | 482b2841c1948df2b485b89fecf1335010bb2804 | |
parent | Add file containing output of `svn info` into .zip and .tar.gz files (diff) | |
download | opensim-SC-aa12787a17a21e45f2d0191dbe3cf40ab73a857a.zip opensim-SC-aa12787a17a21e45f2d0191dbe3cf40ab73a857a.tar.gz opensim-SC-aa12787a17a21e45f2d0191dbe3cf40ab73a857a.tar.bz2 opensim-SC-aa12787a17a21e45f2d0191dbe3cf40ab73a857a.tar.xz |
* Added small convenience function to recursively calculate total amounts of items loaded under library inventory node
-rw-r--r-- | OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs | 15 |
1 files changed, 15 insertions, 0 deletions
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 | |||
315 | 315 | ||
316 | return folderList; | 316 | return folderList; |
317 | } | 317 | } |
318 | |||
319 | public int TotalCount | ||
320 | { | ||
321 | get | ||
322 | { | ||
323 | int total = Items.Count; | ||
324 | |||
325 | foreach (InventoryFolderImpl folder in SubFolders.Values) | ||
326 | { | ||
327 | total = total + folder.TotalCount; | ||
328 | } | ||
329 | |||
330 | return total; | ||
331 | } | ||
332 | } | ||
318 | } | 333 | } |
319 | } | 334 | } |