From fc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 1 May 2008 16:41:01 +0000 Subject: * Cleaning code still. --- OpenSim/Grid/InventoryServer/InventoryManager.cs | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'OpenSim/Grid/InventoryServer/InventoryManager.cs') diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs index 5c65317..350a618 100644 --- a/OpenSim/Grid/InventoryServer/InventoryManager.cs +++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs @@ -54,7 +54,7 @@ namespace OpenSim.Grid.InventoryServer Assembly pluginAssembly = Assembly.LoadFrom(FileName); m_log.Info("[" + OpenInventory_Main.LogName + "]: " + - "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); + "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); foreach (Type pluginType in pluginAssembly.GetTypes()) { if (!pluginType.IsAbstract) @@ -68,7 +68,7 @@ namespace OpenSim.Grid.InventoryServer plug.Initialise(dbconnect); _databasePlugin = plug; m_log.Info("[" + OpenInventory_Main.LogName + "]: " + - "Invenstorage: Added IInventoryData Interface"); + "Invenstorage: Added IInventoryData Interface"); break; } } @@ -136,10 +136,12 @@ namespace OpenSim.Grid.InventoryServer return fixupFolder(inventory.root, null); } + #region Nested type: GetInventory + public class GetInventory : BaseStreamHandler { - private SerializableInventory _inventory; - private InventoryManager _manager; + private readonly SerializableInventory _inventory; + private readonly InventoryManager _manager; public GetInventory(InventoryManager manager) : base("GET", "/inventory") @@ -181,7 +183,7 @@ namespace OpenSim.Grid.InventoryServer { byte[] result = new byte[] {}; - string[] parms = path.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries); + string[] parms = path.Split(new[] {'/'}, StringSplitOptions.RemoveEmptyEntries); if (parms.Length > 1) { if (string.Compare(parms[1], "library", true) == 0) @@ -190,7 +192,7 @@ namespace OpenSim.Grid.InventoryServer saveInventoryToStream(_inventory, ms); result = ms.GetBuffer(); - Array.Resize(ref result, (int) ms.Length); + Array.Resize(ref result, (int) ms.Length); } else if (string.Compare(parms[1], "user", true) == 0) { @@ -203,5 +205,7 @@ namespace OpenSim.Grid.InventoryServer return result; } } + + #endregion } -} +} \ No newline at end of file -- cgit v1.1