From 801da4346aeb3c08969c4845f5c595135a64470a Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 12 Feb 2009 09:53:12 +0000 Subject: * optimized usings. --- OpenSim/ApplicationPlugins/Rest/Inventory/IRest.cs | 2 -- .../Rest/Inventory/IRestHandler.cs | 1 - .../Rest/Inventory/RequestData.cs | 9 +++----- OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs | 23 +++++++++---------- .../Rest/Inventory/RestAppearanceServices.cs | 10 +-------- .../Rest/Inventory/RestAssetServices.cs | 8 +------ .../Rest/Inventory/RestHandler.cs | 2 -- .../Rest/Inventory/RestInventoryServices.cs | 26 +++++++++++----------- .../Rest/Inventory/RestTestServices.cs | 7 ------ .../Rest/Inventory/tests/ITest.cs | 2 -- .../Rest/Inventory/tests/Remote.cs | 11 +-------- 11 files changed, 30 insertions(+), 71 deletions(-) (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory') diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/IRest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/IRest.cs index f593349..7a7af31 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/IRest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/IRest.cs @@ -25,8 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; - namespace OpenSim.ApplicationPlugins.Rest.Inventory { /// diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs index 997c2d3..b27f9c5 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs @@ -25,7 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using OpenSim.Framework.Servers; namespace OpenSim.ApplicationPlugins.Rest.Inventory diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs index 20e619a..2ce5166 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RequestData.cs @@ -26,17 +26,14 @@ */ using System; +using System.Collections.Generic; using System.IO; -using System.Reflection; -using System.Text; using System.Security.Cryptography; +using System.Text; using System.Text.RegularExpressions; -using System.Collections.Generic; -using System.Collections.Specialized; +using System.Xml; using OpenSim.Framework; using OpenSim.Framework.Servers; -using OpenMetaverse; -using System.Xml; namespace OpenSim.ApplicationPlugins.Rest.Inventory { diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs index bfa27c3..2ac1001 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/Rest.cs @@ -30,18 +30,17 @@ using System; using System.Collections.Generic; using System.Reflection; using System.Text; +using log4net; +using Nini.Config; using OpenSim.Framework; -using OpenSim.Framework.Servers; using OpenSim.Framework.Communications; -using OpenSim.Framework.Communications.Cache; -using Nini.Config; namespace OpenSim.ApplicationPlugins.Rest.Inventory { public class Rest { - internal static readonly log4net.ILog Log = - log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + internal static readonly ILog Log = + LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); internal static bool DEBUG = Log.IsDebugEnabled; @@ -468,25 +467,25 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory public static void Dump(byte[] data) { - char[] buffer = new char[Rest.DumpLineSize]; + char[] buffer = new char[DumpLineSize]; int cc = 0; for (int i = 0; i < data.Length; i++) { - if (i % Rest.DumpLineSize == 0) Console.Write("\n{0}: ",i.ToString("d8")); + if (i % DumpLineSize == 0) Console.Write("\n{0}: ",i.ToString("d8")); if (i % 4 == 0) Console.Write(" "); Console.Write("{0}",data[i].ToString("x2")); if (data[i] < 127 && data[i] > 31) - buffer[i % Rest.DumpLineSize] = (char) data[i]; + buffer[i % DumpLineSize] = (char) data[i]; else - buffer[i % Rest.DumpLineSize] = '.'; + buffer[i % DumpLineSize] = '.'; cc++; - if (i != 0 && (i + 1) % Rest.DumpLineSize == 0) + if (i != 0 && (i + 1) % DumpLineSize == 0) { Console.Write(" |"+(new String(buffer))+"|"); cc = 0; @@ -497,11 +496,11 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory if (cc != 0) { - for (int i = cc ; i < Rest.DumpLineSize; i++) + for (int i = cc ; i < DumpLineSize; i++) { if (i % 4 == 0) Console.Write(" "); Console.Write(" "); - buffer[i % Rest.DumpLineSize] = ' '; + buffer[i % DumpLineSize] = ' '; } Console.WriteLine(" |"+(new String(buffer))+"|"); } diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index 0775007..667cf57 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs @@ -27,18 +27,10 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Threading; using System.Xml; -using System.Drawing; +using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Servers; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Communications.Cache; -using OpenMetaverse; -using OpenMetaverse.Imaging; -using Nini.Config; namespace OpenSim.ApplicationPlugins.Rest.Inventory { diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs index 241bc90..2996030 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs @@ -25,17 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using OpenMetaverse; -using Nini.Config; using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; using System.Xml; +using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Servers; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Communications.Cache; namespace OpenSim.ApplicationPlugins.Rest.Inventory { diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs index c022e09..81801df 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs @@ -28,9 +28,7 @@ using System; using System.Collections.Generic; using System.Reflection; -using OpenSim.Framework; using OpenSim.Framework.Servers; -using OpenSim.ApplicationPlugins.Rest; namespace OpenSim.ApplicationPlugins.Rest.Inventory { diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs index aa222bb..853b004 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs @@ -27,18 +27,18 @@ using System; using System.Collections.Generic; +using System.Drawing; +using System.Globalization; using System.IO; using System.Threading; -using System.Xml; -using System.Drawing; using System.Timers; -using OpenSim.Framework; -using OpenSim.Framework.Servers; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Communications.Cache; +using System.Xml; using OpenMetaverse; using OpenMetaverse.Imaging; -using Nini.Config; +using OpenSim.Framework; +using OpenSim.Framework.Communications.Cache; +using OpenSim.Framework.Servers; +using Timer=System.Timers.Timer; namespace OpenSim.ApplicationPlugins.Rest.Inventory { @@ -1931,19 +1931,19 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory switch (ic.xml.Name) { case "current": - ic.CurrentPermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber); + ic.CurrentPermissions = UInt32.Parse(ic.xml.Value, NumberStyles.HexNumber); break; case "next": - ic.NextPermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber); + ic.NextPermissions = UInt32.Parse(ic.xml.Value, NumberStyles.HexNumber); break; case "group": - ic.GroupPermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber); + ic.GroupPermissions = UInt32.Parse(ic.xml.Value, NumberStyles.HexNumber); break; case "everyone": - ic.EveryOnePermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber); + ic.EveryOnePermissions = UInt32.Parse(ic.xml.Value, NumberStyles.HexNumber); break; case "base": - ic.BasePermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber); + ic.BasePermissions = UInt32.Parse(ic.xml.Value, NumberStyles.HexNumber); break; default: Rest.Log.DebugFormat("{0} Permissions: invalid attribute {1}:{2}", @@ -2176,7 +2176,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory internal UserProfileData userProfile = null; internal InventoryFolderBase root = null; internal bool timeout = false; - internal System.Timers.Timer watchDog = new System.Timers.Timer(); + internal Timer watchDog = new Timer(); internal InventoryRequestData(OSHttpRequest request, OSHttpResponse response, string prefix) : base(request, response, prefix) diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs index b7c9027..1e87996 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs @@ -26,17 +26,10 @@ * */ -using OpenMetaverse; -using Nini.Config; using System; -using System.IO; using System.Collections.Generic; using System.Reflection; -using System.Threading; -using OpenSim.Framework; using OpenSim.Framework.Servers; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Communications.Cache; namespace OpenSim.ApplicationPlugins.Rest.Inventory { diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/tests/ITest.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/tests/ITest.cs index a3f1d14..8c3ef75 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/tests/ITest.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/tests/ITest.cs @@ -26,8 +26,6 @@ * */ -using System; - namespace OpenSim.ApplicationPlugins.Rest.Inventory { diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs index 4a98834..c81cb9f 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/tests/Remote.cs @@ -25,18 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using OpenMetaverse; -using Nini.Config; using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; -using System.Xml; -using OpenSim.Framework; +using OpenMetaverse; using OpenSim.Region.Framework.Scenes; -using OpenSim.Framework.Servers; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Communications.Cache; namespace OpenSim.ApplicationPlugins.Rest.Inventory.Tests { -- cgit v1.1