* optimized usings.

This commit is contained in:
lbsa71
2009-02-12 09:53:12 +00:00
parent d21601d497
commit 801da4346a
383 changed files with 1318 additions and 2154 deletions

View File

@@ -28,10 +28,7 @@
using System;
using System.Collections.Generic;
using OpenMetaverse;
using OSD = OpenMetaverse.StructuredData.OSD;
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
using OSDParser = OpenMetaverse.StructuredData.OSDParser;
using OpenMetaverse.StructuredData;
namespace OpenSim.Framework
{
@@ -108,13 +105,13 @@ namespace OpenSim.Framework
if (args["caps_path"] != null)
CapsPath = args["caps_path"].AsString();
if ((args["children_seeds"] != null) && (args["children_seeds"].Type == OpenMetaverse.StructuredData.OSDType.Array))
if ((args["children_seeds"] != null) && (args["children_seeds"].Type == OSDType.Array))
{
OSDArray childrenSeeds = (OSDArray)(args["children_seeds"]);
ChildrenCapSeeds = new Dictionary<ulong, string>();
foreach (OSD o in childrenSeeds)
{
if (o.Type == OpenMetaverse.StructuredData.OSDType.Map)
if (o.Type == OSDType.Map)
{
ulong handle = 0;
string seed = "";

View File

@@ -26,9 +26,7 @@
*/
using System;
using System.Collections.Generic;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.Framework
{

View File

@@ -26,6 +26,7 @@
*/
using System;
using System.IO;
namespace OpenSim.Framework
{
@@ -62,7 +63,7 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("assetset_location", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"Location of 'AssetSets.xml'",
string.Format(".{0}assets{0}AssetSets.xml", System.IO.Path.DirectorySeparatorChar), false);
string.Format(".{0}assets{0}AssetSets.xml", Path.DirectorySeparatorChar), false);
}
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)

View File

@@ -30,9 +30,9 @@ using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Xml;
using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenMetaverse;
/// <summary>
/// Loads assets from the filesystem location. Not yet a plugin, though it should be.

View File

@@ -383,7 +383,7 @@ namespace OpenSim.Framework
// Find an object in cache by delegate.
//
public Object Find(Predicate<OpenSim.Framework.CacheItemBase> d)
public Object Find(Predicate<CacheItemBase> d)
{
CacheItemBase item = m_Index.Find(d);
@@ -460,7 +460,7 @@ namespace OpenSim.Framework
if (m_DefaultTTL.Ticks != 0)
{
DateTime now= System.DateTime.Now;
DateTime now= DateTime.Now;
foreach (CacheItemBase item in new List<CacheItemBase>(m_Index))
{

View File

@@ -26,14 +26,10 @@
*/
using System;
using OpenMetaverse;
using System.Collections;
using System.Collections.Generic;
using OSD = OpenMetaverse.StructuredData.OSD;
using OSDMap = OpenMetaverse.StructuredData.OSDMap;
using OSDArray = OpenMetaverse.StructuredData.OSDArray;
using OSDParser = OpenMetaverse.StructuredData.OSDParser;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.Framework
{
@@ -486,7 +482,7 @@ namespace OpenSim.Framework
if (args["agent_access"] != null)
Byte.TryParse(args["agent_access"].AsString(), out AgentAccess);
if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OpenMetaverse.StructuredData.OSDType.Array)
if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
{
OSDArray textures = (OSDArray)(args["agent_textures"]);
AgentTextures = new UUID[textures.Count];
@@ -498,28 +494,28 @@ namespace OpenSim.Framework
if (args["active_group_id"] != null)
ActiveGroupID = args["active_group_id"].AsUUID();
if ((args["groups"] != null) && (args["groups"]).Type == OpenMetaverse.StructuredData.OSDType.Array)
if ((args["groups"] != null) && (args["groups"]).Type == OSDType.Array)
{
OSDArray groups = (OSDArray)(args["groups"]);
Groups = new AgentGroupData[groups.Count];
int i = 0;
foreach (OSD o in groups)
{
if (o.Type == OpenMetaverse.StructuredData.OSDType.Map)
if (o.Type == OSDType.Map)
{
Groups[i++] = new AgentGroupData((OSDMap)o);
}
}
}
if ((args["animations"] != null) && (args["animations"]).Type == OpenMetaverse.StructuredData.OSDType.Array)
if ((args["animations"] != null) && (args["animations"]).Type == OSDType.Array)
{
OSDArray anims = (OSDArray)(args["animations"]);
Anims = new AgentAnimationData[anims.Count];
int i = 0;
foreach (OSD o in anims)
{
if (o.Type == OpenMetaverse.StructuredData.OSDType.Map)
if (o.Type == OSDType.Map)
{
Anims[i++] = new AgentAnimationData((OSDMap)o);
}

View File

@@ -25,9 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
namespace OpenSim.Framework.Client

View File

@@ -29,11 +29,11 @@ using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
using GlynnTucker.Cache;
using log4net;
using OpenMetaverse;
using OpenMetaverse.Packets;
using log4net;
using OpenSim.Framework.Statistics;
using GlynnTucker.Cache;
namespace OpenSim.Framework.Communications.Cache
{

View File

@@ -28,11 +28,11 @@
using System;
using System.Reflection;
using System.Threading;
using OpenMetaverse;
using log4net;
using OpenMetaverse;
using OpenSim.Data;
using OpenSim.Framework.AssetLoader.Filesystem;
using OpenSim.Framework.Statistics;
using OpenSim.Data;
namespace OpenSim.Framework.Communications.Cache
{

View File

@@ -27,7 +27,6 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Framework.Communications.Cache
{

View File

@@ -28,10 +28,8 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
using OpenMetaverse;
using log4net;
using OpenMetaverse;
namespace OpenSim.Framework.Communications.Cache
{

View File

@@ -1,4 +1,4 @@
/*
/*
* Copyright (c) Contributors, http://www.openmetaverse.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -34,11 +34,11 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Xml.Serialization;
using log4net;
using OpenSim.Framework.Servers;
using System.Security.Cryptography;
namespace OpenSim.Framework.Communications.Cache
{

View File

@@ -28,6 +28,7 @@
using System;
using System.Collections.Generic;
using OpenMetaverse;
//using System.Reflection;
//using log4net;

View File

@@ -30,9 +30,9 @@ using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Xml;
using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenMetaverse;
namespace OpenSim.Framework.Communications.Cache
{

View File

@@ -25,12 +25,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
using OpenMetaverse;
using log4net;
using OpenMetaverse;
namespace OpenSim.Framework.Communications.Cache
{

View File

@@ -30,11 +30,10 @@ using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using OpenMetaverse;
using log4net;
using OpenSim.Framework.Communications.Cache;
using OpenMetaverse;
using OpenSim.Framework.Servers;
using OpenSim.Framework;
// using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Framework.Communications.Capabilities

View File

@@ -25,7 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities

View File

@@ -27,7 +27,6 @@
using System.Collections;
using System.IO;
using System.Net;
using System.Text;
using OpenSim.Framework.Servers;

View File

@@ -25,11 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Reflection;
using OpenMetaverse;
using log4net;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;

View File

@@ -34,7 +34,6 @@ using log4net;
using Nini.Config;
using Nwc.XmlRpc;
using OpenSim.Framework.Servers;
using OpenSim.Framework;
namespace OpenSim.Framework.Communications
{

View File

@@ -25,9 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
namespace OpenSim.Framework.Communications

View File

@@ -25,11 +25,6 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework;
namespace OpenSim.Framework.Communications
{

View File

@@ -1,4 +1,4 @@
/*
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -25,9 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework.Communications.Cache;
namespace OpenSim.Framework.Communications
{

View File

@@ -25,14 +25,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
using OpenMetaverse;
using log4net;
using OpenMetaverse;
using OpenSim.Data;
namespace OpenSim.Framework.Communications

View File

@@ -29,10 +29,10 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using log4net;
using Nwc.XmlRpc;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
namespace OpenSim.Framework.Communications
{

View File

@@ -33,10 +33,10 @@ using System.Reflection;
using System.Text.RegularExpressions;
using System.Threading;
using System.Web;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using log4net;
using Nwc.XmlRpc;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Statistics;

View File

@@ -291,7 +291,7 @@ namespace OpenSim.Framework.Communications
{
_response = (HttpWebResponse) _request.GetResponse();
}
catch (System.Net.WebException e)
catch (WebException e)
{
m_log.ErrorFormat("[ASSET] Error fetching asset from asset server");
m_log.Debug(e.ToString());

View File

@@ -25,16 +25,13 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using log4net;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
//using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Communications.Local;
using OpenSim.Tests.Common.Mock;
using OpenSim.Data;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Tests.Common.Mock;
//using OpenSim.Framework;
namespace OpenSim.Framework.Communications.Tests
{

View File

@@ -26,10 +26,8 @@
*/
using OpenMetaverse;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Communications.Local;
using OpenSim.Tests.Common.Mock;
namespace OpenSim.Framework.Communications.Tests
{

View File

@@ -29,8 +29,6 @@ using System;
using System.Collections;
using System.Net;
using System.Text.RegularExpressions;
using System.Xml;
using Nini;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using Nwc.XmlRpc;
@@ -61,7 +59,7 @@ namespace OpenSim.Framework.Communications.Tests
IPEndPoint capsEndPoint = new IPEndPoint(IPAddress.Loopback, 9123);
CommunicationsManager commsManager
= new TestCommunicationsManager(new OpenSim.Framework.NetworkServersInfo(42, 43));
= new TestCommunicationsManager(new NetworkServersInfo(42, 43));
commsManager.GridService.RegisterRegion(
new RegionInfo(42, 43, capsEndPoint, regionExternalName));
@@ -89,7 +87,7 @@ namespace OpenSim.Framework.Communications.Tests
Assert.That(responseData["first_name"], Is.EqualTo(firstName));
Assert.That(responseData["last_name"], Is.EqualTo(lastName));
Assert.That(
responseData["circuit_code"], Is.GreaterThanOrEqualTo(0) & Is.LessThanOrEqualTo(System.Int32.MaxValue));
responseData["circuit_code"], Is.GreaterThanOrEqualTo(0) & Is.LessThanOrEqualTo(Int32.MaxValue));
Regex capsSeedPattern
= new Regex("^http://"
@@ -108,7 +106,7 @@ namespace OpenSim.Framework.Communications.Tests
IPEndPoint capsEndPoint = new IPEndPoint(IPAddress.Loopback, 9123);
CommunicationsManager commsManager
= new TestCommunicationsManager(new OpenSim.Framework.NetworkServersInfo(42, 43));
= new TestCommunicationsManager(new NetworkServersInfo(42, 43));
commsManager.GridService.RegisterRegion(
new RegionInfo(42, 43, capsEndPoint, regionExternalName));
@@ -159,7 +157,7 @@ namespace OpenSim.Framework.Communications.Tests
Hashtable invlibroothash = (Hashtable) invlibroot[0];
Assert.That(invlibroothash["folder_id"],Is.EqualTo("00000112-000f-0000-0000-000100bba000"));
Assert.That(
responseData["circuit_code"], Is.GreaterThanOrEqualTo(0) & Is.LessThanOrEqualTo(System.Int32.MaxValue));
responseData["circuit_code"], Is.GreaterThanOrEqualTo(0) & Is.LessThanOrEqualTo(Int32.MaxValue));
Assert.That(responseData["message"], Is.EqualTo("Hello folks"));
Assert.That(responseData["buddy-list"], Is.Empty);
Assert.That(responseData["start_location"], Is.EqualTo("last"));

View File

@@ -26,17 +26,16 @@
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Reflection;
using System.Security.Cryptography;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using log4net;
using Nwc.XmlRpc;
using OpenSim.Framework.Statistics;
using OpenMetaverse;
using OpenMetaverse.StructuredData;
using OpenSim.Data;
using OpenSim.Framework.Statistics;
namespace OpenSim.Framework.Communications
{

View File

@@ -25,8 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Xml;
using System.Xml.Serialization;
namespace OpenSim.Framework.Communications.XMPP

View File

@@ -25,8 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Xml;
using System.Xml.Serialization;
namespace OpenSim.Framework.Communications.XMPP

View File

@@ -25,8 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Xml;
using System.Xml.Serialization;
namespace OpenSim.Framework.Communications.XMPP

View File

@@ -25,8 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Xml;
using System.Xml.Serialization;
namespace OpenSim.Framework.Communications.XMPP

View File

@@ -27,12 +27,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using log4net;
namespace OpenSim.Framework.Communications.XMPP
{

View File

@@ -26,7 +26,6 @@
*/
using System;
using System.Xml;
using System.Xml.Serialization;
namespace OpenSim.Framework.Communications.XMPP

View File

@@ -28,7 +28,6 @@
using System.IO;
using System.Text;
using System.Xml;
using IOStream = System.IO.Stream;
namespace OpenSim.Framework.Communications.XMPP

View File

@@ -288,7 +288,7 @@ namespace OpenSim.Framework
// if the first character is a "$", assume it's the name
// of an environment variable and substitute with the value of that variable
if (console_result.StartsWith("$"))
console_result = System.Environment.GetEnvironmentVariable(console_result.Substring(1));
console_result = Environment.GetEnvironmentVariable(console_result.Substring(1));
switch (configOption.configurationType)
{

View File

@@ -26,10 +26,11 @@
*/
using System;
using System.Text;
using System.Reflection;
using System.Diagnostics;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Text;
using System.Threading;
using log4net;
namespace OpenSim.Framework.Console
@@ -77,8 +78,8 @@ namespace OpenSim.Framework.Console
/// <value>
/// Commands organized by keyword in a tree
/// </value>
private Dictionary<string, Object> tree =
new Dictionary<string, Object>();
private Dictionary<string, object> tree =
new Dictionary<string, object>();
/// <summary>
/// Get help for the given help string
@@ -149,7 +150,7 @@ namespace OpenSim.Framework.Console
return help;
}
private List<string> CollectHelp(Dictionary<string, Object> dict)
private List<string> CollectHelp(Dictionary<string, object> dict)
{
List<string> result = new List<string>();
@@ -708,7 +709,7 @@ namespace OpenSim.Framework.Console
public void LockOutput()
{
System.Threading.Monitor.Enter(cmdline);
Monitor.Enter(cmdline);
try
{
if (y != -1)
@@ -738,7 +739,7 @@ namespace OpenSim.Framework.Console
y = System.Console.CursorTop;
Show();
}
System.Threading.Monitor.Exit(cmdline);
Monitor.Exit(cmdline);
}
public void Output(string text)

View File

@@ -28,8 +28,6 @@
using System;
using OpenSim.Framework;
namespace OpenSim.Framework
{
public class ForeignUserProfileData : UserProfileData

View File

@@ -26,12 +26,8 @@
*
*/
using System;
using System.Collections.Generic;
using System.Net;
using OpenSim.Framework;
namespace OpenSim.Framework
{
public class HGNetworkServersInfo

View File

@@ -1,4 +1,4 @@
/*
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@@ -25,9 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
namespace OpenSim.Framework

View File

@@ -25,8 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using OpenSim.Framework;
using OpenMetaverse;
namespace OpenSim.Framework

View File

@@ -42,7 +42,7 @@ namespace OpenSim.Framework
/// <summary>
/// This interface, describes a generic plugin
/// </summary>
public interface IPlugin : System.IDisposable
public interface IPlugin : IDisposable
{
/// <summary>
/// Returns the plugin version

View File

@@ -25,7 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System.Collections.Generic;
using OpenMetaverse;
using OpenSim.Framework.Console;

View File

@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using OpenMetaverse;
using OpenMetaverse;
namespace OpenSim.Framework
{
/// <summary>

View File

@@ -125,7 +125,7 @@ namespace OpenSim.Framework
}
}
public OpenMetaverse.Parcel.ParcelCategory Category {
public Parcel.ParcelCategory Category {
get {
return _category;
}
@@ -233,7 +233,7 @@ namespace OpenSim.Framework
}
}
public OpenMetaverse.Parcel.ParcelStatus Status {
public Parcel.ParcelStatus Status {
get {
return _status;
}
@@ -314,7 +314,7 @@ namespace OpenSim.Framework
}
}
public List<OpenMetaverse.ParcelManager.ParcelAccessEntry> ParcelAccessList {
public List<ParcelManager.ParcelAccessEntry> ParcelAccessList {
get {
return _parcelAccessList;
}

View File

@@ -25,7 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections;
namespace OpenSim.Framework.Servers

View File

@@ -35,12 +35,12 @@ using System.Reflection;
using System.Text;
using System.Threading;
using System.Xml;
using OpenMetaverse.StructuredData;
using HttpServer;
using log4net;
using Nwc.XmlRpc;
using OpenMetaverse.StructuredData;
using CoolHTTPListener = HttpServer.HttpListener;
using IHttpClientContext = HttpServer.IHttpClientContext;
using IHttpRequest = HttpServer.IHttpRequest;
using HttpListener=System.Net.HttpListener;
namespace OpenSim.Framework.Servers
{
@@ -219,7 +219,7 @@ namespace OpenSim.Framework.Servers
public void OnHandleRequestIOThread(IHttpClientContext context, IHttpRequest request)
{
OSHttpRequest req = new OSHttpRequest(context, request);
OSHttpResponse resp = new OSHttpResponse(new HttpServer.HttpResponse(context, request));
OSHttpResponse resp = new OSHttpResponse(new HttpResponse(context, request));
//resp.KeepAlive = req.KeepAlive;
//m_log.Info("[Debug BASE HTTP SERVER]: Got Request");
//HttpServerContextObj objstate= new HttpServerContextObj(req,resp);
@@ -1373,7 +1373,7 @@ namespace OpenSim.Framework.Servers
{
//m_httpListener.Prefixes.Add("http://+:" + m_port + "/");
//m_httpListener.Prefixes.Add("http://10.1.1.5:" + m_port + "/");
m_httpListener2 = new HttpServer.HttpListener(IPAddress.Any, (int)m_port);
m_httpListener2 = new CoolHTTPListener(IPAddress.Any, (int)m_port);
m_httpListener2.ExceptionThrown += httpServerException;
m_httpListener2.LogWriter = httpserverlog;
@@ -1408,7 +1408,7 @@ namespace OpenSim.Framework.Servers
}
}
public void httpServerDisconnectMonitor(HttpServer.IHttpClientContext source, SocketError err)
public void httpServerDisconnectMonitor(IHttpClientContext source, SocketError err)
{
switch (err)
{
@@ -1564,11 +1564,11 @@ namespace OpenSim.Framework.Servers
/// Relays HttpServer log messages to our own logging mechanism.
/// </summary>
/// There is also a UseTraceLogs line in this file that can be uncommented for more detailed log information
public class HttpServerLogWriter : HttpServer.ILogWriter
public class HttpServerLogWriter : ILogWriter
{
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public void Write(object source, HttpServer.LogPrio priority, string message)
public void Write(object source, LogPrio priority, string message)
{
/*
switch (priority)

View File

@@ -38,6 +38,7 @@ using log4net.Core;
using log4net.Repository;
using OpenSim.Framework.Console;
using OpenSim.Framework.Statistics;
using Timer=System.Timers.Timer;
namespace OpenSim.Framework.Servers
{
@@ -52,7 +53,7 @@ namespace OpenSim.Framework.Servers
/// This will control a periodic log printout of the current 'show stats' (if they are active) for this
/// server.
/// </summary>
private System.Timers.Timer m_periodicDiagnosticsTimer = new System.Timers.Timer(60 * 60 * 1000);
private Timer m_periodicDiagnosticsTimer = new Timer(60 * 60 * 1000);
protected ConsoleBase m_console;
@@ -266,7 +267,7 @@ namespace OpenSim.Framework.Servers
// If there is no threshold set then the threshold is effectively everything.
Level thresholdLevel
= (null != consoleAppender.Threshold ? consoleAppender.Threshold : log4net.Core.Level.All);
= (null != consoleAppender.Threshold ? consoleAppender.Threshold : Level.All);
Notice(String.Format("Console log level is {0}", thresholdLevel));
}

View File

@@ -26,7 +26,6 @@
*/
using System.IO;
using System.Net;
namespace OpenSim.Framework.Servers
{

View File

@@ -27,7 +27,6 @@
using System.IO;
using System.Text;
using System.Net;
namespace OpenSim.Framework.Servers
{

View File

@@ -25,10 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System.Collections;
using System.IO;
using System.Net;
namespace OpenSim.Framework.Servers
{
public interface IHttpAgentHandler

View File

@@ -27,7 +27,6 @@
using System.Collections;
using System.IO;
using System.Net;
namespace OpenSim.Framework.Servers
{

View File

@@ -29,8 +29,8 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Net;
using System.IO;
using System.Net;
using System.Reflection;
using System.Text;
using HttpServer;

View File

@@ -25,8 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections;
using System.IO;
using System.Net;
using System.Text;

View File

@@ -26,7 +26,6 @@
*/
using System.IO;
using System.Net;
using System.Xml;
using System.Xml.Serialization;

View File

@@ -25,7 +25,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections;
namespace OpenSim.Framework.Servers

View File

@@ -28,12 +28,10 @@
using System;
using System.IO;
using System.Net;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using log4net;
namespace OpenSim.Framework.Servers

View File

@@ -27,7 +27,6 @@
using System.IO;
using System.Text;
using System.Net;
namespace OpenSim.Framework.Servers
{

View File

@@ -31,23 +31,18 @@ using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Text;
using HttpServer;
using HttpServer.Exceptions;
using HttpServer.FormDecoders;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using OpenSim.Framework.Servers;
namespace OpenSim.Framework.Servers.Tests
{
[TestFixture]
public class OSHttpTests
{
// we need an IHttpClientContext for our tests
public class TestHttpClientContext: HttpServer.IHttpClientContext
public class TestHttpClientContext: IHttpClientContext
{
private bool _secured;
public bool Secured
@@ -68,7 +63,7 @@ namespace OpenSim.Framework.Servers.Tests
public void Send(byte[] buffer, int offset, int size) {}
}
public class TestHttpRequest: HttpServer.IHttpRequest
public class TestHttpRequest: IHttpRequest
{
public bool BodyIsComplete
{

View File

@@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using OpenMetaverse;
using OpenMetaverse.Packets;
namespace OpenSim.Framework
@@ -73,15 +74,15 @@ namespace OpenSim.Framework
}
private uint m_objectCapacity;
public OpenMetaverse.UUID RegionUUID
public UUID RegionUUID
{
get { return regionUUID;}
}
private OpenMetaverse.UUID regionUUID;
private UUID regionUUID;
public SimStats(
uint regionX, uint regionY, uint regionFlags, uint objectCapacity,
SimStatsPacket.RegionBlock regionBlock, SimStatsPacket.StatBlock[] statsBlock, OpenMetaverse.UUID pRUUID)
SimStatsPacket.RegionBlock regionBlock, SimStatsPacket.StatBlock[] statsBlock, UUID pRUUID)
{
regionUUID = pRUUID;
m_regionX = regionX;

View File

@@ -29,7 +29,6 @@ using System;
using System.Collections.Generic;
using System.Text;
using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework.Statistics.Interfaces;
namespace OpenSim.Framework.Statistics

View File

@@ -25,9 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using OpenMetaverse;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
namespace OpenSim.Framework.Tests
{

View File

@@ -25,9 +25,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using OpenMetaverse;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using OpenMetaverse;
using OpenSim.Tests.Common;
namespace OpenSim.Framework.Tests

View File

@@ -26,6 +26,7 @@
*/
using System;
using System.IO;
namespace OpenSim.Framework
{
@@ -113,7 +114,7 @@ namespace OpenSim.Framework
configMember.addConfigurationOption("library_location",
ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY,
"Path to library control file",
string.Format(".{0}inventory{0}Libraries.xml", System.IO.Path.DirectorySeparatorChar), false);
string.Format(".{0}inventory{0}Libraries.xml", Path.DirectorySeparatorChar), false);
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
"DLL for database provider", "OpenSim.Data.MySQL.dll", false);

View File

@@ -194,7 +194,7 @@ namespace OpenSim.Framework
}
public static T Clamp<T>(T x, T min, T max)
where T : System.IComparable<T>
where T : IComparable<T>
{
return x.CompareTo(max) > 0 ? max :
x.CompareTo(min) < 0 ? min :
@@ -758,8 +758,8 @@ namespace OpenSim.Framework
memory.Read(compressed, 0, compressed.Length);
byte[] compressedBuffer = new byte[compressed.Length + 4];
System.Buffer.BlockCopy(compressed, 0, compressedBuffer, 4, compressed.Length);
System.Buffer.BlockCopy(BitConverter.GetBytes(buffer.Length), 0, compressedBuffer, 0, 4);
Buffer.BlockCopy(compressed, 0, compressedBuffer, 4, compressed.Length);
Buffer.BlockCopy(BitConverter.GetBytes(buffer.Length), 0, compressedBuffer, 0, 4);
return Convert.ToBase64String(compressedBuffer);
}
@@ -872,9 +872,9 @@ namespace OpenSim.Framework
{
string os = String.Empty;
if (System.Environment.OSVersion.Platform != PlatformID.Unix)
if (Environment.OSVersion.Platform != PlatformID.Unix)
{
os = System.Environment.OSVersion.ToString();
os = Environment.OSVersion.ToString();
}
else
{

View File

@@ -132,7 +132,7 @@ namespace OpenSim.Framework
//int randNum = Util.RandomClass.Next(0, 1000);
float range = setting.VisualParam.MaxValue - setting.VisualParam.MinValue;
// float val =((float) randNum )/ ((float)(1000.0f / range));
float val = (float)OpenSim.Framework.Util.RandomClass.NextDouble() * range * 0.2f;
float val = (float)Util.RandomClass.NextDouble() * range * 0.2f;
setting.Value = setting.VisualParam.MinValue + (range / 2) + val;
}
}