diff --git a/LibreMetaverse/Inventory.cs b/LibreMetaverse/Inventory.cs
index b2d06ac5..67adef2e 100644
--- a/LibreMetaverse/Inventory.cs
+++ b/LibreMetaverse/Inventory.cs
@@ -61,6 +61,7 @@ namespace OpenMetaverse
///
public class Inventory
{
+ #region EventHandlers
/// The event subscribers, null if no subscribers
private EventHandler m_InventoryObjectUpdated;
@@ -129,7 +130,10 @@ namespace OpenMetaverse
add { lock (m_InventoryObjectAddedLock) { m_InventoryObjectAdded += value; } }
remove { lock (m_InventoryObjectAddedLock) { m_InventoryObjectAdded -= value; } }
}
-
+ #endregion EventHandlers
+
+ #region Properties
+
///
/// The root folder of this avatars inventory
///
@@ -166,8 +170,18 @@ namespace OpenMetaverse
///
public InventoryNode LibraryRootNode { get; private set; }
+ ///
+ /// Returns owner of Inventory
+ ///
public UUID Owner { get; }
+ ///
+ /// Returns number of stored entries
+ ///
+ public int Count => Items.Count;
+
+ #endregion Properties
+
private GridClient Client;
//private InventoryManager Manager;
private ConcurrentDictionary Items;
@@ -315,8 +329,7 @@ namespace OpenMetaverse
}
///
- /// Used to find out if Inventory contains the InventoryObject
- /// specified by .
+ /// Check that Inventory contains the InventoryObject specified by .
///
/// The UUID to check.
/// true if inventory contains uuid, false otherwise
@@ -325,11 +338,25 @@ namespace OpenMetaverse
return Items.ContainsKey(uuid);
}
+ ///
+ /// Check that Inventory contains the InventoryObject specified by .
+ ///
+ /// Object to check for
+ /// true if inventory contains object, false otherwise
public bool Contains(InventoryBase obj)
{
return Contains(obj.UUID);
}
+ ///
+ /// Clear all entries from Inventory store.
+ /// Useful for regenerating contents.
+ ///
+ public void Clear()
+ {
+ Items.Clear();
+ }
+
///
/// Saves the current inventory structure to a cache file
///