LFL)
{
LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList();
foreach (FriendListItem fl in LFL)
diff --git a/OpenSim/Framework/Communications/RestClient.cs b/OpenSim/Framework/Communications/RestClient.cs
index 91284e846c..b0b7b1eca3 100644
--- a/OpenSim/Framework/Communications/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient.cs
@@ -164,7 +164,7 @@ namespace OpenSim.Framework.Communications
///
/// string to be examined
/// true if slash is present
- private bool isSlashed(string s)
+ private static bool isSlashed(string s)
{
return s.Substring(s.Length - 1, 1) == "/";
}
@@ -196,7 +196,7 @@ namespace OpenSim.Framework.Communications
sb.Append("&");
sb.Append(kv.Key);
- if (kv.Value != null && kv.Value.Length != 0)
+ if (!string.IsNullOrEmpty(kv.Value))
{
sb.Append("=");
sb.Append(kv.Value);
diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs
index 91b87a5039..b452794249 100644
--- a/OpenSim/Framework/ConfigurationMember.cs
+++ b/OpenSim/Framework/ConfigurationMember.cs
@@ -472,7 +472,7 @@ namespace OpenSim.Framework
}
}
- private IGenericConfig LoadConfigDll(string dllName)
+ private static IGenericConfig LoadConfigDll(string dllName)
{
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
IGenericConfig plug = null;
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index 0b22d0e8c9..b33654576b 100644
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Framework.Console
///
/// arbitrary string for input
/// an ansii color
- private ConsoleColor DeriveColor(string input)
+ private static ConsoleColor DeriveColor(string input)
{
int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
return (ConsoleColor) colIdx;
diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs
index 86df3c0518..d381179eb5 100644
--- a/OpenSim/Framework/Console/OpenSimAppender.cs
+++ b/OpenSim/Framework/Console/OpenSimAppender.cs
@@ -101,7 +101,7 @@ namespace OpenSim.Framework.Console
}
}
- private ConsoleColor DeriveColor(string input)
+ private static ConsoleColor DeriveColor(string input)
{
int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
return (ConsoleColor) colIdx;
diff --git a/OpenSim/Framework/PacketPool.cs b/OpenSim/Framework/PacketPool.cs
index be56cdc2a1..5eac9de5dd 100644
--- a/OpenSim/Framework/PacketPool.cs
+++ b/OpenSim/Framework/PacketPool.cs
@@ -89,7 +89,7 @@ namespace OpenSim.Framework
public Packet GetPacket(PacketType type)
{
- Packet packet = null;
+ Packet packet;
lock (pool)
{
@@ -109,7 +109,7 @@ namespace OpenSim.Framework
}
// private byte[] decoded_header = new byte[10];
- private PacketType GetType(byte[] bytes)
+ private static PacketType GetType(byte[] bytes)
{
byte[] decoded_header = new byte[10 + 8];
ushort id;
diff --git a/OpenSim/Framework/Remoting.cs b/OpenSim/Framework/Remoting.cs
index 7f18221125..cb0911e1a9 100644
--- a/OpenSim/Framework/Remoting.cs
+++ b/OpenSim/Framework/Remoting.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Framework
/// A
/// B
/// C
- private byte[] AppendArrays(byte[] a, byte[] b)
+ private static byte[] AppendArrays(byte[] a, byte[] b)
{
byte[] c = new byte[a.Length + b.Length];
Buffer.BlockCopy(a, 0, c, 0, a.Length);
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs
index 7c268ed106..088d9441b3 100644
--- a/OpenSim/Framework/Servers/BaseHttpServer.cs
+++ b/OpenSim/Framework/Servers/BaseHttpServer.cs
@@ -496,7 +496,7 @@ namespace OpenSim.Framework.Servers
}
}
- private void DoHTTPGruntWork(Hashtable responsedata, HttpListenerResponse response)
+ private static void DoHTTPGruntWork(Hashtable responsedata, HttpListenerResponse response)
{
int responsecode = (int)responsedata["int_response_code"];
string responseString = (string)responsedata["str_response_string"];
@@ -505,7 +505,7 @@ namespace OpenSim.Framework.Servers
//Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this
//and should check for NullReferenceExceptions
- if (contentType == null || contentType == "")
+ if (string.IsNullOrEmpty(contentType))
{
contentType = "text/html";
}
@@ -677,12 +677,12 @@ namespace OpenSim.Framework.Servers
}
// Fallback HTTP responses in case the HTTP error response files don't exist
- private string getDefaultHTTP404(string host)
+ private static string getDefaultHTTP404(string host)
{
return "404 Page not found
Ooops!
The page you requested has been obsconded with by knomes. Find hippos quick!
If you are trying to log-in, your link parameters should have: "-loginpage http://" + host + "/?method=login -loginuri http://" + host + "/" in your link
";
}
- private string getDefaultHTTP500()
+ private static string getDefaultHTTP500()
{
return "500 Internal Server Error
Ooops!
The server you requested is overun by knomes! Find hippos quick!
";
}
diff --git a/OpenSim/Framework/Servers/BinaryStreamHandler.cs b/OpenSim/Framework/Servers/BinaryStreamHandler.cs
index bfa3bd55c3..dcd1cba42d 100644
--- a/OpenSim/Framework/Servers/BinaryStreamHandler.cs
+++ b/OpenSim/Framework/Servers/BinaryStreamHandler.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Framework.Servers
m_method = binaryMethod;
}
- private byte[] ReadFully(Stream stream)
+ private static byte[] ReadFully(Stream stream)
{
byte[] buffer = new byte[32768];
using (MemoryStream ms = new MemoryStream())
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs
index ee2f129288..7eb9c3474f 100644
--- a/OpenSim/Grid/GridServer/GridManager.cs
+++ b/OpenSim/Grid/GridServer/GridManager.cs
@@ -78,8 +78,6 @@ namespace OpenSim.Grid.GridServer
m_log.Info("[DATA]: Added IGridData Interface");
}
- typeInterface = null;
-
// Logs go here
typeInterface = pluginType.GetInterface("ILogData", true);
@@ -91,12 +89,8 @@ namespace OpenSim.Grid.GridServer
_logplugins.Add(plug.getName(), plug);
m_log.Info("[DATA]: Added ILogData Interface");
}
-
- typeInterface = null;
}
}
-
- pluginAssembly = null;
}
///
@@ -274,7 +268,7 @@ namespace OpenSim.Grid.GridServer
sim.regionSendKey == Config.SimRecvKey);
}
- private XmlRpcResponse ErrorResponse(string error)
+ private static XmlRpcResponse ErrorResponse(string error)
{
XmlRpcResponse errorResponse = new XmlRpcResponse();
Hashtable errorResponseData = new Hashtable();
@@ -609,7 +603,7 @@ namespace OpenSim.Grid.GridServer
response.Value = responseData;
//RegionProfileData TheSim = null;
- string uuid = String.Empty; ;
+ string uuid;
Hashtable requestData = (Hashtable)request.Params[0];
if (requestData.ContainsKey("UUID"))
@@ -744,8 +738,7 @@ namespace OpenSim.Grid.GridServer
response.Value = responseData;
IList simProfileList = new ArrayList();
- bool fastMode = false; // MySQL Only
- fastMode = (Config.DatabaseProvider == "OpenSim.Data.MySQL.dll");
+ bool fastMode = (Config.DatabaseProvider == "OpenSim.Data.MySQL.dll");
if (fastMode)
{
diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs
index 1d4a4e3684..5c65317a6c 100644
--- a/OpenSim/Grid/InventoryServer/InventoryManager.cs
+++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs
@@ -71,12 +71,8 @@ namespace OpenSim.Grid.InventoryServer
"Invenstorage: Added IInventoryData Interface");
break;
}
-
- typeInterface = null;
}
}
-
- pluginAssembly = null;
}
protected static SerializableInventory loadInventoryFromXmlFile(string fileName)
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
index 729d262989..528b51c2d6 100644
--- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
+++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs
@@ -80,14 +80,14 @@ namespace OpenSim.Grid.ScriptServer
Console.ReadLine();
}
- private void RPC_ReceiveCommand(int ID, string Command, object[] p)
+ private static void RPC_ReceiveCommand(int ID, string Command, object[] p)
{
m_log.Info("[SERVER]: Received command: '" + Command + "'");
if (p != null)
{
for (int i = 0; i < p.Length; i++)
{
- m_log.Info("[SERVER]: Param " + i + ": " + p[i].ToString());
+ m_log.Info("[SERVER]: Param " + i + ": " + p[i]);
}
}
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs
index 22505cb879..28f5c4cecc 100644
--- a/OpenSim/Grid/UserServer/MessageServersConnector.cs
+++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs
@@ -209,7 +209,7 @@ namespace OpenSim.Grid.UserServer
XmlRpcRequest GridReq = new XmlRpcRequest("logout_of_simulator", SendParams);
try
{
- XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000);
+ GridReq.Send(serv.URI, 6000);
}
catch (WebException)
{
@@ -243,7 +243,7 @@ namespace OpenSim.Grid.UserServer
XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams);
try
{
- XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000);
+ GridReq.Send(serv.URI, 6000);
m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login");
}
catch (WebException)
diff --git a/OpenSim/Region/ClientStack/PacketQueue.cs b/OpenSim/Region/ClientStack/PacketQueue.cs
index 54c9fdcb9f..7101b4cf2c 100644
--- a/OpenSim/Region/ClientStack/PacketQueue.cs
+++ b/OpenSim/Region/ClientStack/PacketQueue.cs
@@ -377,9 +377,9 @@ namespace OpenSim.Region.ClientStack
}
- private int ScaleThrottle(int value, int curmax, int newmax)
+ private static int ScaleThrottle(int value, int curmax, int newmax)
{
- return (int) (((float) value/(float) curmax)*newmax);
+ return (value / curmax) * newmax;
}
public byte[] GetThrottlesPacked(float multiplier)
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
index 40de537dc3..f3b3a204b6 100644
--- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
+++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs
@@ -653,7 +653,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
GC.Collect();
}
- internal void BulletXMessage(string message, bool isWarning)
+ internal static void BulletXMessage(string message, bool isWarning)
{
PhysicsPluginManager.PhysicsPluginMessage("[Modified BulletX]:\t" + message, isWarning);
}
@@ -1455,7 +1455,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
}
catch (Exception ex)
{
- _parent_scene.BulletXMessage(_parent_scene.is_ex_message + ex.Message, true);
+ BulletXScene.BulletXMessage(_parent_scene.is_ex_message + ex.Message, true);
rigidBody.ActivationState = ActivationState.DisableSimulation;
_parent_scene.AddForgottenRigidBody(rigidBody);
}
@@ -1532,10 +1532,10 @@ namespace OpenSim.Region.Physics.BulletXPlugin
}
catch (Exception ex)
{
- _parentscene.BulletXMessage(ex.Message, true);
+ BulletXScene.BulletXMessage(ex.Message, true);
}
}
- _parentscene.BulletXMessage("BulletXPlanet created.", false);
+ BulletXScene.BulletXMessage("BulletXPlanet created.", false);
}
internal float HeightValue(Vector3 position)
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
index 7dad7ee3d3..f3af621128 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
StartThread();
}
- private void StartThread()
+ private static void StartThread()
{
if (cmdHandlerThread == null)
{
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
index c4a721ef92..39babd6eff 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
@@ -343,7 +343,7 @@ namespace OpenSim.DataStore.MSSQL
dt.Columns.Add(col);
}
- private DataTable createTerrainTable()
+ private static DataTable createTerrainTable()
{
DataTable terrain = new DataTable("terrain");
@@ -354,7 +354,7 @@ namespace OpenSim.DataStore.MSSQL
return terrain;
}
- private DataTable createPrimTable()
+ private static DataTable createPrimTable()
{
DataTable prims = new DataTable("prims");
@@ -418,7 +418,7 @@ namespace OpenSim.DataStore.MSSQL
return prims;
}
- private DataTable createShapeTable()
+ private static DataTable createShapeTable()
{
DataTable shapes = new DataTable("primshapes");
createCol(shapes, "UUID", typeof (String));
@@ -619,7 +619,7 @@ namespace OpenSim.DataStore.MSSQL
}
}
- private PrimitiveBaseShape buildShape(DataRow row)
+ private static PrimitiveBaseShape buildShape(DataRow row)
{
PrimitiveBaseShape s = new PrimitiveBaseShape();
s.Scale = new LLVector3(
@@ -675,7 +675,7 @@ namespace OpenSim.DataStore.MSSQL
return s;
}
- private void fillShapeRow(DataRow row, SceneObjectPart prim)
+ private static void fillShapeRow(DataRow row, SceneObjectPart prim)
{
PrimitiveBaseShape s = prim.Shape;
row["UUID"] = prim.UUID;
@@ -770,7 +770,7 @@ namespace OpenSim.DataStore.MSSQL
*
**********************************************************************/
- private SqlCommand createInsertCommand(string table, DataTable dt)
+ private static SqlCommand createInsertCommand(string table, DataTable dt)
{
/**
* This is subtle enough to deserve some commentary.
@@ -804,7 +804,7 @@ namespace OpenSim.DataStore.MSSQL
return cmd;
}
- private SqlCommand createUpdateCommand(string table, string pk, DataTable dt)
+ private static SqlCommand createUpdateCommand(string table, string pk, DataTable dt)
{
string sql = "update " + table + " set ";
string subsql = String.Empty;
@@ -831,7 +831,7 @@ namespace OpenSim.DataStore.MSSQL
}
- private string defineTable(DataTable dt)
+ private static string defineTable(DataTable dt)
{
string sql = "create table " + dt.TableName + "(";
string subsql = String.Empty;
@@ -854,7 +854,7 @@ namespace OpenSim.DataStore.MSSQL
return sql;
}
- private void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val)
+ private static void fillTerrainRow(DataRow row, LLUUID regionUUID, int rev, double[,] val)
{
row["RegionUUID"] = regionUUID;
row["Revision"] = rev;
@@ -890,7 +890,7 @@ namespace OpenSim.DataStore.MSSQL
/// for us.
///
///a built Sql parameter
- private SqlParameter createSqlParameter(string name, Type type)
+ private static SqlParameter createSqlParameter(string name, Type type)
{
SqlParameter param = new SqlParameter();
param.ParameterName = "@" + name;
@@ -934,7 +934,7 @@ namespace OpenSim.DataStore.MSSQL
da.InsertCommand.Connection = conn;
}
- private void InitDB(SqlConnection conn)
+ private static void InitDB(SqlConnection conn)
{
string createPrims = defineTable(createPrimTable());
string createShapes = defineTable(createShapeTable());
@@ -977,7 +977,7 @@ namespace OpenSim.DataStore.MSSQL
conn.Close();
}
- private bool TestTables(SqlConnection conn)
+ private static bool TestTables(SqlConnection conn)
{
SqlCommand primSelectCmd = new SqlCommand(primSelect, conn);
SqlDataAdapter pDa = new SqlDataAdapter(primSelectCmd);
@@ -1046,7 +1046,7 @@ namespace OpenSim.DataStore.MSSQL
*
**********************************************************************/
- private DbType dbtypeFromType(Type type)
+ private static DbType dbtypeFromType(Type type)
{
if (type == typeof (String))
{
@@ -1072,7 +1072,7 @@ namespace OpenSim.DataStore.MSSQL
// this is something we'll need to implement for each db
// slightly differently.
- private string SqlType(Type type)
+ private static string SqlType(Type type)
{
if (type == typeof (String))
{
diff --git a/OpenSim/Tools/Export/OpenSimExport.cs b/OpenSim/Tools/Export/OpenSimExport.cs
index 76d8d11189..4891ea7d5e 100644
--- a/OpenSim/Tools/Export/OpenSimExport.cs
+++ b/OpenSim/Tools/Export/OpenSimExport.cs
@@ -72,7 +72,7 @@ namespace OpenSimExport
}
}
- protected ConsoleBase CreateConsole()
+ protected static ConsoleBase CreateConsole()
{
return new ConsoleBase("Export", null);
}
diff --git a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs
index bceb9afddb..6d593c930d 100644
--- a/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs
+++ b/ThirdParty/3Di/LoadBalancer/LoadBalancerPlugin.cs
@@ -434,7 +434,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
src_region.RegionID.ToString());
}
- private void SerializeClient(int idx, Scene scene, ScenePresence pre, string export_dir)
+ private static void SerializeClient(int idx, Scene scene, ScenePresence pre, string export_dir)
{
string filename;
IClientAPI controller = null;
diff --git a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs
index 6d55094f60..eaafe6cded 100644
--- a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs
+++ b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs
@@ -312,7 +312,7 @@ namespace OpenSim.ApplicationPlugins.RegionProxy
}
}
- protected void ClosePort(ServerData sd)
+ protected static void ClosePort(ServerData sd)
{
// Close the port if it exists and is open
if (sd.server == null) return;