* Breaking all the code, breaking all the code..!

* Made a bunch more members static, removed some dead code, general cleaning.
0.6.0-stable
Adam Frisby 2008-05-01 16:23:53 +00:00
parent 5231903778
commit 01f31fd933
27 changed files with 61 additions and 72 deletions

View File

@ -1352,7 +1352,7 @@ namespace OpenSim.Data.SQLite
* *
**********************************************************************/ **********************************************************************/
private SqliteCommand createInsertCommand(string table, DataTable dt) private static SqliteCommand createInsertCommand(string table, DataTable dt)
{ {
/** /**
* This is subtle enough to deserve some commentary. * This is subtle enough to deserve some commentary.
@ -1387,7 +1387,7 @@ namespace OpenSim.Data.SQLite
return cmd; return cmd;
} }
private SqliteCommand createUpdateCommand(string table, string pk, DataTable dt) private static SqliteCommand createUpdateCommand(string table, string pk, DataTable dt)
{ {
string sql = "update " + table + " set "; string sql = "update " + table + " set ";
string subsql = String.Empty; string subsql = String.Empty;
@ -1415,7 +1415,7 @@ namespace OpenSim.Data.SQLite
} }
private string defineTable(DataTable dt) private static string defineTable(DataTable dt)
{ {
string sql = "create table " + dt.TableName + "("; string sql = "create table " + dt.TableName + "(";
string subsql = String.Empty; string subsql = String.Empty;
@ -1457,7 +1457,7 @@ namespace OpenSim.Data.SQLite
/// for us. /// for us.
///</summary> ///</summary>
///<returns>a built sqlite parameter</returns> ///<returns>a built sqlite parameter</returns>
private SqliteParameter createSqliteParameter(string name, Type type) private static SqliteParameter createSqliteParameter(string name, Type type)
{ {
SqliteParameter param = new SqliteParameter(); SqliteParameter param = new SqliteParameter();
param.ParameterName = ":" + name; param.ParameterName = ":" + name;

View File

@ -784,7 +784,7 @@ namespace OpenSim.Data.SQLite
conn.Close(); conn.Close();
} }
private bool TestTables(SqliteConnection conn) private static bool TestTables(SqliteConnection conn)
{ {
SqliteCommand cmd = new SqliteCommand(userSelect, conn); SqliteCommand cmd = new SqliteCommand(userSelect, conn);
SqliteCommand fcmd = new SqliteCommand(userFriendsSelect, conn); SqliteCommand fcmd = new SqliteCommand(userFriendsSelect, conn);

View File

@ -43,7 +43,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
protected AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage) protected static AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage)
{ {
AssetBase asset = new AssetBase( AssetBase asset = new AssetBase(
new LLUUID(assetIdStr), new LLUUID(assetIdStr),
@ -64,7 +64,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
return asset; return asset;
} }
protected void LoadAsset(AssetBase info, bool image, string path) protected static void LoadAsset(AssetBase info, bool image, string path)
{ {
FileInfo fInfo = new FileInfo(path); FileInfo fInfo = new FileInfo(path);
long numBytes = fInfo.Length; long numBytes = fInfo.Length;
@ -119,9 +119,9 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
/// <summary> /// <summary>
/// Use the asset set information at path to load assets /// Use the asset set information at path to load assets
/// </summary> /// </summary>
/// <param name="path"></param> /// <param name="assetSetPath"></param>
/// <param name="assets"></param> /// <param name="assets"></param>
protected void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets) protected static void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets)
{ {
m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath); m_log.InfoFormat("[ASSETS]: Loading asset set {0}", assetSetPath);

View File

@ -542,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary> /// </summary>
/// <param name="data"></param> /// <param name="data"></param>
/// <returns></returns> /// <returns></returns>
private int CalculateNumPackets(byte[] data) private static int CalculateNumPackets(byte[] data)
{ {
const uint m_maxPacketSize = 600; const uint m_maxPacketSize = 600;
int numPackets = 1; int numPackets = 1;

View File

@ -241,7 +241,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="path"></param> /// <param name="path"></param>
/// <param name="fileDescription"></param> /// <param name="fileDescription"></param>
/// <param name="action"></param> /// <param name="action"></param>
private void LoadFromFile(string path, string fileDescription, ConfigAction action) private static void LoadFromFile(string path, string fileDescription, ConfigAction action)
{ {
if (File.Exists(path)) if (File.Exists(path))
{ {

View File

@ -378,7 +378,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// ///
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
protected LLSDMapLayer GetLLSDMapLayerResponse() protected static LLSDMapLayer GetLLSDMapLayerResponse()
{ {
LLSDMapLayer mapLayer = new LLSDMapLayer(); LLSDMapLayer mapLayer = new LLSDMapLayer();
mapLayer.Right = 5000; mapLayer.Right = 5000;
@ -758,7 +758,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// bw.Close(); // bw.Close();
// fs.Close(); // fs.Close();
//} //}
private void SaveAssetToFile(string filename, byte[] data) private static void SaveAssetToFile(string filename, byte[] data)
{ {
string assetPath = "UserAssets"; string assetPath = "UserAssets";
if (!Directory.Exists(assetPath)) if (!Directory.Exists(assetPath))
@ -840,7 +840,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// bw.Close(); // bw.Close();
// fs.Close(); // fs.Close();
//} //}
private void SaveAssetToFile(string filename, byte[] data) private static void SaveAssetToFile(string filename, byte[] data)
{ {
string assetPath = "UserAssets"; string assetPath = "UserAssets";
if (!Directory.Exists(assetPath)) if (!Directory.Exists(assetPath))
@ -945,7 +945,7 @@ namespace OpenSim.Framework.Communications.Capabilities
// bw.Close(); // bw.Close();
// fs.Close(); // fs.Close();
//} //}
private void SaveAssetToFile(string filename, byte[] data) private static void SaveAssetToFile(string filename, byte[] data)
{ {
string assetPath = "UserAssets"; string assetPath = "UserAssets";
if (!Directory.Exists(assetPath)) if (!Directory.Exists(assetPath))

View File

@ -496,7 +496,7 @@ namespace OpenSim.Framework.Communications
return llsdBack; return llsdBack;
} }
private LLSDArray WrapLLSDMap(LLSDMap wrapMe) private static LLSDArray WrapLLSDMap(LLSDMap wrapMe)
{ {
LLSDArray array = new LLSDArray(); LLSDArray array = new LLSDArray();
array.Add(wrapMe); array.Add(wrapMe);

View File

@ -728,7 +728,7 @@ namespace OpenSim.Framework.Communications
return m_welcomeMessage; return m_welcomeMessage;
} }
private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) private static LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL)
{ {
LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList(); LoginResponse.BuddyList buddylistreturn = new LoginResponse.BuddyList();
foreach (FriendListItem fl in LFL) foreach (FriendListItem fl in LFL)

View File

@ -164,7 +164,7 @@ namespace OpenSim.Framework.Communications
/// </summary> /// </summary>
/// <param name="s">string to be examined</param> /// <param name="s">string to be examined</param>
/// <returns>true if slash is present</returns> /// <returns>true if slash is present</returns>
private bool isSlashed(string s) private static bool isSlashed(string s)
{ {
return s.Substring(s.Length - 1, 1) == "/"; return s.Substring(s.Length - 1, 1) == "/";
} }
@ -196,7 +196,7 @@ namespace OpenSim.Framework.Communications
sb.Append("&"); sb.Append("&");
sb.Append(kv.Key); sb.Append(kv.Key);
if (kv.Value != null && kv.Value.Length != 0) if (!string.IsNullOrEmpty(kv.Value))
{ {
sb.Append("="); sb.Append("=");
sb.Append(kv.Value); sb.Append(kv.Value);

View File

@ -472,7 +472,7 @@ namespace OpenSim.Framework
} }
} }
private IGenericConfig LoadConfigDll(string dllName) private static IGenericConfig LoadConfigDll(string dllName)
{ {
Assembly pluginAssembly = Assembly.LoadFrom(dllName); Assembly pluginAssembly = Assembly.LoadFrom(dllName);
IGenericConfig plug = null; IGenericConfig plug = null;

View File

@ -66,7 +66,7 @@ namespace OpenSim.Framework.Console
/// </summary> /// </summary>
/// <param name="input">arbitrary string for input</param> /// <param name="input">arbitrary string for input</param>
/// <returns>an ansii color</returns> /// <returns>an ansii color</returns>
private ConsoleColor DeriveColor(string input) private static ConsoleColor DeriveColor(string input)
{ {
int colIdx = (input.ToUpper().GetHashCode() % 6) + 9; int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
return (ConsoleColor) colIdx; return (ConsoleColor) colIdx;

View File

@ -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; int colIdx = (input.ToUpper().GetHashCode() % 6) + 9;
return (ConsoleColor) colIdx; return (ConsoleColor) colIdx;

View File

@ -89,7 +89,7 @@ namespace OpenSim.Framework
public Packet GetPacket(PacketType type) public Packet GetPacket(PacketType type)
{ {
Packet packet = null; Packet packet;
lock (pool) lock (pool)
{ {
@ -109,7 +109,7 @@ namespace OpenSim.Framework
} }
// private byte[] decoded_header = new byte[10]; // 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]; byte[] decoded_header = new byte[10 + 8];
ushort id; ushort id;

View File

@ -123,7 +123,7 @@ namespace OpenSim.Framework
/// <param name="a">A</param> /// <param name="a">A</param>
/// <param name="b">B</param> /// <param name="b">B</param>
/// <returns>C</returns> /// <returns>C</returns>
private byte[] AppendArrays(byte[] a, byte[] b) private static byte[] AppendArrays(byte[] a, byte[] b)
{ {
byte[] c = new byte[a.Length + b.Length]; byte[] c = new byte[a.Length + b.Length];
Buffer.BlockCopy(a, 0, c, 0, a.Length); Buffer.BlockCopy(a, 0, c, 0, a.Length);

View File

@ -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"]; int responsecode = (int)responsedata["int_response_code"];
string responseString = (string)responsedata["str_response_string"]; 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 //Even though only one other part of the entire code uses HTTPHandlers, we shouldn't expect this
//and should check for NullReferenceExceptions //and should check for NullReferenceExceptions
if (contentType == null || contentType == "") if (string.IsNullOrEmpty(contentType))
{ {
contentType = "text/html"; contentType = "text/html";
} }
@ -677,12 +677,12 @@ namespace OpenSim.Framework.Servers
} }
// Fallback HTTP responses in case the HTTP error response files don't exist // 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 "<HTML><HEAD><TITLE>404 Page not found</TITLE><BODY><BR /><H1>Ooops!</H1><P>The page you requested has been obsconded with by knomes. Find hippos quick!</P><P>If you are trying to log-in, your link parameters should have: &quot;-loginpage http://" + host + "/?method=login -loginuri http://" + host + "/&quot; in your link </P></BODY></HTML>"; return "<HTML><HEAD><TITLE>404 Page not found</TITLE><BODY><BR /><H1>Ooops!</H1><P>The page you requested has been obsconded with by knomes. Find hippos quick!</P><P>If you are trying to log-in, your link parameters should have: &quot;-loginpage http://" + host + "/?method=login -loginuri http://" + host + "/&quot; in your link </P></BODY></HTML>";
} }
private string getDefaultHTTP500() private static string getDefaultHTTP500()
{ {
return "<HTML><HEAD><TITLE>500 Internal Server Error</TITLE><BODY><BR /><H1>Ooops!</H1><P>The server you requested is overun by knomes! Find hippos quick!</P></BODY></HTML>"; return "<HTML><HEAD><TITLE>500 Internal Server Error</TITLE><BODY><BR /><H1>Ooops!</H1><P>The server you requested is overun by knomes! Find hippos quick!</P></BODY></HTML>";
} }

View File

@ -51,7 +51,7 @@ namespace OpenSim.Framework.Servers
m_method = binaryMethod; m_method = binaryMethod;
} }
private byte[] ReadFully(Stream stream) private static byte[] ReadFully(Stream stream)
{ {
byte[] buffer = new byte[32768]; byte[] buffer = new byte[32768];
using (MemoryStream ms = new MemoryStream()) using (MemoryStream ms = new MemoryStream())

View File

@ -78,8 +78,6 @@ namespace OpenSim.Grid.GridServer
m_log.Info("[DATA]: Added IGridData Interface"); m_log.Info("[DATA]: Added IGridData Interface");
} }
typeInterface = null;
// Logs go here // Logs go here
typeInterface = pluginType.GetInterface("ILogData", true); typeInterface = pluginType.GetInterface("ILogData", true);
@ -91,12 +89,8 @@ namespace OpenSim.Grid.GridServer
_logplugins.Add(plug.getName(), plug); _logplugins.Add(plug.getName(), plug);
m_log.Info("[DATA]: Added ILogData Interface"); m_log.Info("[DATA]: Added ILogData Interface");
} }
typeInterface = null;
} }
} }
pluginAssembly = null;
} }
/// <summary> /// <summary>
@ -274,7 +268,7 @@ namespace OpenSim.Grid.GridServer
sim.regionSendKey == Config.SimRecvKey); sim.regionSendKey == Config.SimRecvKey);
} }
private XmlRpcResponse ErrorResponse(string error) private static XmlRpcResponse ErrorResponse(string error)
{ {
XmlRpcResponse errorResponse = new XmlRpcResponse(); XmlRpcResponse errorResponse = new XmlRpcResponse();
Hashtable errorResponseData = new Hashtable(); Hashtable errorResponseData = new Hashtable();
@ -609,7 +603,7 @@ namespace OpenSim.Grid.GridServer
response.Value = responseData; response.Value = responseData;
//RegionProfileData TheSim = null; //RegionProfileData TheSim = null;
string uuid = String.Empty; ; string uuid;
Hashtable requestData = (Hashtable)request.Params[0]; Hashtable requestData = (Hashtable)request.Params[0];
if (requestData.ContainsKey("UUID")) if (requestData.ContainsKey("UUID"))
@ -744,8 +738,7 @@ namespace OpenSim.Grid.GridServer
response.Value = responseData; response.Value = responseData;
IList simProfileList = new ArrayList(); IList simProfileList = new ArrayList();
bool fastMode = false; // MySQL Only bool fastMode = (Config.DatabaseProvider == "OpenSim.Data.MySQL.dll");
fastMode = (Config.DatabaseProvider == "OpenSim.Data.MySQL.dll");
if (fastMode) if (fastMode)
{ {

View File

@ -71,12 +71,8 @@ namespace OpenSim.Grid.InventoryServer
"Invenstorage: Added IInventoryData Interface"); "Invenstorage: Added IInventoryData Interface");
break; break;
} }
typeInterface = null;
} }
} }
pluginAssembly = null;
} }
protected static SerializableInventory loadInventoryFromXmlFile(string fileName) protected static SerializableInventory loadInventoryFromXmlFile(string fileName)

View File

@ -80,14 +80,14 @@ namespace OpenSim.Grid.ScriptServer
Console.ReadLine(); 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 + "'"); m_log.Info("[SERVER]: Received command: '" + Command + "'");
if (p != null) if (p != null)
{ {
for (int i = 0; i < p.Length; i++) 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]);
} }
} }

View File

@ -209,7 +209,7 @@ namespace OpenSim.Grid.UserServer
XmlRpcRequest GridReq = new XmlRpcRequest("logout_of_simulator", SendParams); XmlRpcRequest GridReq = new XmlRpcRequest("logout_of_simulator", SendParams);
try try
{ {
XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); GridReq.Send(serv.URI, 6000);
} }
catch (WebException) catch (WebException)
{ {
@ -243,7 +243,7 @@ namespace OpenSim.Grid.UserServer
XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams); XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams);
try try
{ {
XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); GridReq.Send(serv.URI, 6000);
m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login"); m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login");
} }
catch (WebException) catch (WebException)

View File

@ -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) public byte[] GetThrottlesPacked(float multiplier)

View File

@ -653,7 +653,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
GC.Collect(); GC.Collect();
} }
internal void BulletXMessage(string message, bool isWarning) internal static void BulletXMessage(string message, bool isWarning)
{ {
PhysicsPluginManager.PhysicsPluginMessage("[Modified BulletX]:\t" + message, isWarning); PhysicsPluginManager.PhysicsPluginMessage("[Modified BulletX]:\t" + message, isWarning);
} }
@ -1455,7 +1455,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin
} }
catch (Exception ex) 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; rigidBody.ActivationState = ActivationState.DisableSimulation;
_parent_scene.AddForgottenRigidBody(rigidBody); _parent_scene.AddForgottenRigidBody(rigidBody);
} }
@ -1532,10 +1532,10 @@ namespace OpenSim.Region.Physics.BulletXPlugin
} }
catch (Exception ex) 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) internal float HeightValue(Vector3 position)

View File

@ -66,7 +66,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
StartThread(); StartThread();
} }
private void StartThread() private static void StartThread()
{ {
if (cmdHandlerThread == null) if (cmdHandlerThread == null)
{ {

View File

@ -343,7 +343,7 @@ namespace OpenSim.DataStore.MSSQL
dt.Columns.Add(col); dt.Columns.Add(col);
} }
private DataTable createTerrainTable() private static DataTable createTerrainTable()
{ {
DataTable terrain = new DataTable("terrain"); DataTable terrain = new DataTable("terrain");
@ -354,7 +354,7 @@ namespace OpenSim.DataStore.MSSQL
return terrain; return terrain;
} }
private DataTable createPrimTable() private static DataTable createPrimTable()
{ {
DataTable prims = new DataTable("prims"); DataTable prims = new DataTable("prims");
@ -418,7 +418,7 @@ namespace OpenSim.DataStore.MSSQL
return prims; return prims;
} }
private DataTable createShapeTable() private static DataTable createShapeTable()
{ {
DataTable shapes = new DataTable("primshapes"); DataTable shapes = new DataTable("primshapes");
createCol(shapes, "UUID", typeof (String)); 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(); PrimitiveBaseShape s = new PrimitiveBaseShape();
s.Scale = new LLVector3( s.Scale = new LLVector3(
@ -675,7 +675,7 @@ namespace OpenSim.DataStore.MSSQL
return s; return s;
} }
private void fillShapeRow(DataRow row, SceneObjectPart prim) private static void fillShapeRow(DataRow row, SceneObjectPart prim)
{ {
PrimitiveBaseShape s = prim.Shape; PrimitiveBaseShape s = prim.Shape;
row["UUID"] = prim.UUID; 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. * This is subtle enough to deserve some commentary.
@ -804,7 +804,7 @@ namespace OpenSim.DataStore.MSSQL
return cmd; 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 sql = "update " + table + " set ";
string subsql = String.Empty; 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 sql = "create table " + dt.TableName + "(";
string subsql = String.Empty; string subsql = String.Empty;
@ -854,7 +854,7 @@ namespace OpenSim.DataStore.MSSQL
return sql; 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["RegionUUID"] = regionUUID;
row["Revision"] = rev; row["Revision"] = rev;
@ -890,7 +890,7 @@ namespace OpenSim.DataStore.MSSQL
/// for us. /// for us.
///</summary> ///</summary>
///<returns>a built Sql parameter</returns> ///<returns>a built Sql parameter</returns>
private SqlParameter createSqlParameter(string name, Type type) private static SqlParameter createSqlParameter(string name, Type type)
{ {
SqlParameter param = new SqlParameter(); SqlParameter param = new SqlParameter();
param.ParameterName = "@" + name; param.ParameterName = "@" + name;
@ -934,7 +934,7 @@ namespace OpenSim.DataStore.MSSQL
da.InsertCommand.Connection = conn; da.InsertCommand.Connection = conn;
} }
private void InitDB(SqlConnection conn) private static void InitDB(SqlConnection conn)
{ {
string createPrims = defineTable(createPrimTable()); string createPrims = defineTable(createPrimTable());
string createShapes = defineTable(createShapeTable()); string createShapes = defineTable(createShapeTable());
@ -977,7 +977,7 @@ namespace OpenSim.DataStore.MSSQL
conn.Close(); conn.Close();
} }
private bool TestTables(SqlConnection conn) private static bool TestTables(SqlConnection conn)
{ {
SqlCommand primSelectCmd = new SqlCommand(primSelect, conn); SqlCommand primSelectCmd = new SqlCommand(primSelect, conn);
SqlDataAdapter pDa = new SqlDataAdapter(primSelectCmd); 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)) if (type == typeof (String))
{ {
@ -1072,7 +1072,7 @@ namespace OpenSim.DataStore.MSSQL
// this is something we'll need to implement for each db // this is something we'll need to implement for each db
// slightly differently. // slightly differently.
private string SqlType(Type type) private static string SqlType(Type type)
{ {
if (type == typeof (String)) if (type == typeof (String))
{ {

View File

@ -72,7 +72,7 @@ namespace OpenSimExport
} }
} }
protected ConsoleBase CreateConsole() protected static ConsoleBase CreateConsole()
{ {
return new ConsoleBase("Export", null); return new ConsoleBase("Export", null);
} }

View File

@ -434,7 +434,7 @@ namespace OpenSim.ApplicationPlugins.LoadBalancer
src_region.RegionID.ToString()); 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; string filename;
IClientAPI controller = null; IClientAPI controller = null;

View File

@ -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 // Close the port if it exists and is open
if (sd.server == null) return; if (sd.server == null) return;