From 523190377861292dfecdaddebe1204301a0c7912 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 1 May 2008 16:03:53 +0000 Subject: * In ur code. Making it static. * Converted a bunch of functions to static functions. --- .../RemoteController/RemoteAdminPlugin.cs | 4 +- OpenSim/Data/MSSQL/MSSQLDataStore.cs | 44 +++++++++++----------- OpenSim/Data/MSSQL/MSSQLInventoryData.cs | 4 +- OpenSim/Data/MySQL/MySQLDataStore.cs | 44 +++++++++++----------- OpenSim/Data/MySQL/MySQLInventoryData.cs | 4 +- OpenSim/Data/NHibernate/NHibernateUserData.cs | 2 +- OpenSim/Data/SQLite/SQLiteAssetData.cs | 10 ++--- OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 14 +++---- OpenSim/Data/SQLite/SQLiteRegionData.cs | 34 ++++++++--------- OpenSim/Data/SQLite/SQLiteUserData.cs | 2 +- OpenSim/Region/Application/OpenSimMainConsole.cs | 4 +- .../OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | 6 +-- 12 files changed, 86 insertions(+), 86 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 6f82181..e540e4d 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -267,7 +267,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController } - private void checkStringParameters(XmlRpcRequest request, string[] param) + private static void checkStringParameters(XmlRpcRequest request, string[] param) { Hashtable requestData = (Hashtable) request.Params[0]; foreach (string p in param) @@ -279,7 +279,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController } } - private void checkIntegerParams(XmlRpcRequest request, string[] param) + private static void checkIntegerParams(XmlRpcRequest request, string[] param) { Hashtable requestData = (Hashtable) request.Params[0]; foreach (string p in param) diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs index 82aab13..44bc660 100644 --- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs @@ -536,14 +536,14 @@ namespace OpenSim.Data.MSSQL * **********************************************************************/ - private DataColumn createCol(DataTable dt, string name, Type type) + private static DataColumn createCol(DataTable dt, string name, Type type) { DataColumn col = new DataColumn(name, type); dt.Columns.Add(col); return col; } - private DataTable createTerrainTable() + private static DataTable createTerrainTable() { DataTable terrain = new DataTable("terrain"); @@ -554,7 +554,7 @@ namespace OpenSim.Data.MSSQL return terrain; } - private DataTable createPrimTable() + private static DataTable createPrimTable() { DataTable prims = new DataTable("prims"); @@ -618,7 +618,7 @@ namespace OpenSim.Data.MSSQL return prims; } - private DataTable createLandTable() + private static DataTable createLandTable() { DataTable land = new DataTable("land"); createCol(land, "UUID", typeof(String)); @@ -661,7 +661,7 @@ namespace OpenSim.Data.MSSQL return land; } - private DataTable createLandAccessListTable() + private static DataTable createLandAccessListTable() { DataTable landaccess = new DataTable("landaccesslist"); createCol(landaccess, "LandUUID", typeof(String)); @@ -671,7 +671,7 @@ namespace OpenSim.Data.MSSQL return landaccess; } - private DataTable createShapeTable() + private static DataTable createShapeTable() { DataTable shapes = new DataTable("primshapes"); createCol(shapes, "UUID", typeof(String)); @@ -713,7 +713,7 @@ namespace OpenSim.Data.MSSQL return shapes; } - private DataTable createItemsTable() + private static DataTable createItemsTable() { DataTable items = new DataTable("primitems"); @@ -848,7 +848,7 @@ namespace OpenSim.Data.MSSQL /// /// /// - private TaskInventoryItem buildItem(DataRow row) + private static TaskInventoryItem buildItem(DataRow row) { TaskInventoryItem taskItem = new TaskInventoryItem(); @@ -877,7 +877,7 @@ namespace OpenSim.Data.MSSQL return taskItem; } - private LandData buildLandData(DataRow row) + private static LandData buildLandData(DataRow row) { LandData newData = new LandData(); @@ -922,7 +922,7 @@ namespace OpenSim.Data.MSSQL return newData; } - private ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) + private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); entry.AgentID = new LLUUID((string)row["AccessUUID"]); @@ -931,7 +931,7 @@ namespace OpenSim.Data.MSSQL return entry; } - private Array serializeTerrain(double[,] val) + private static Array serializeTerrain(double[,] val) { MemoryStream str = new MemoryStream(65536 * sizeof(double)); BinaryWriter bw = new BinaryWriter(str); @@ -1020,7 +1020,7 @@ namespace OpenSim.Data.MSSQL } } - private void fillItemRow(DataRow row, TaskInventoryItem taskItem) + private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) { row["itemID"] = taskItem.ItemID; row["primID"] = taskItem.ParentPartID; @@ -1044,7 +1044,7 @@ namespace OpenSim.Data.MSSQL row["groupPermissions"] = taskItem.GroupMask; } - private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) + private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) { row["UUID"] = land.globalID.UUID; row["RegionUUID"] = regionUUID.UUID; @@ -1082,14 +1082,14 @@ namespace OpenSim.Data.MSSQL row["UserLookAtZ"] = land.userLookAt.Z; } - private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) + private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) { row["LandUUID"] = parcelID.UUID; row["AccessUUID"] = entry.AgentID.UUID; row["Flags"] = entry.Flags; } - private PrimitiveBaseShape buildShape(DataRow row) + private static PrimitiveBaseShape buildShape(DataRow row) { PrimitiveBaseShape s = new PrimitiveBaseShape(); s.Scale = new LLVector3( @@ -1128,7 +1128,7 @@ namespace OpenSim.Data.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; @@ -1235,7 +1235,7 @@ namespace OpenSim.Data.MSSQL * **********************************************************************/ - private SqlCommand createInsertCommand(string table, DataTable dt) + private static SqlCommand createInsertCommand(string table, DataTable dt) { /** * This is subtle enough to deserve some commentary. @@ -1270,7 +1270,7 @@ namespace OpenSim.Data.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; @@ -1297,7 +1297,7 @@ namespace OpenSim.Data.MSSQL return cmd; } - private string defineTable(DataTable dt) + private static string defineTable(DataTable dt) { string sql = "create table " + dt.TableName + "("; string subsql = String.Empty; @@ -1340,7 +1340,7 @@ namespace OpenSim.Data.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; @@ -1413,7 +1413,7 @@ namespace OpenSim.Data.MSSQL da.DeleteCommand = delete; } - private void InitDB(SqlConnection conn) + private static void InitDB(SqlConnection conn) { string createPrims = defineTable(createPrimTable()); string createShapes = defineTable(createShapeTable()); @@ -1586,7 +1586,7 @@ namespace OpenSim.Data.MSSQL * **********************************************************************/ - private DbType dbtypeFromType(Type type) + private static DbType dbtypeFromType(Type type) { if (type == typeof(String)) { diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs index e23178c..032b2c2 100644 --- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs @@ -302,7 +302,7 @@ namespace OpenSim.Data.MSSQL /// /// The SQL Result /// the item read - private InventoryItemBase readInventoryItem(IDataReader reader) + private static InventoryItemBase readInventoryItem(IDataReader reader) { try { @@ -379,7 +379,7 @@ namespace OpenSim.Data.MSSQL /// /// A MySQL Data Reader /// A List containing inventory folders - protected InventoryFolderBase readInventoryFolder(IDataReader reader) + protected static InventoryFolderBase readInventoryFolder(IDataReader reader) { try { diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs index 33981de..c3fe332 100644 --- a/OpenSim/Data/MySQL/MySQLDataStore.cs +++ b/OpenSim/Data/MySQL/MySQLDataStore.cs @@ -627,24 +627,24 @@ namespace OpenSim.Data.MySQL * **********************************************************************/ - private DataColumn createCol(DataTable dt, string name, Type type) + private static DataColumn createCol(DataTable dt, string name, Type type) { DataColumn col = new DataColumn(name, type); dt.Columns.Add(col); return col; } - private DataTable createTerrainTable() + private static DataTable createTerrainTable() { DataTable terrain = new DataTable("terrain"); createCol(terrain, "RegionUUID", typeof (String)); createCol(terrain, "Revision", typeof (Int32)); - DataColumn heightField = createCol(terrain, "Heightfield", typeof (Byte[])); + createCol(terrain, "Heightfield", typeof (Byte[])); return terrain; } - private DataTable createPrimTable() + private static DataTable createPrimTable() { DataTable prims = new DataTable("prims"); @@ -708,7 +708,7 @@ namespace OpenSim.Data.MySQL return prims; } - private DataTable createLandTable() + private static DataTable createLandTable() { DataTable land = new DataTable("land"); createCol(land, "UUID", typeof (String)); @@ -752,7 +752,7 @@ namespace OpenSim.Data.MySQL return land; } - private DataTable createLandAccessListTable() + private static DataTable createLandAccessListTable() { DataTable landaccess = new DataTable("landaccesslist"); createCol(landaccess, "LandUUID", typeof (String)); @@ -762,7 +762,7 @@ namespace OpenSim.Data.MySQL return landaccess; } - private DataTable createShapeTable() + private static DataTable createShapeTable() { DataTable shapes = new DataTable("primshapes"); createCol(shapes, "UUID", typeof (String)); @@ -802,7 +802,7 @@ namespace OpenSim.Data.MySQL return shapes; } - private DataTable createItemsTable() + private static DataTable createItemsTable() { DataTable items = new DataTable("primitems"); @@ -937,7 +937,7 @@ namespace OpenSim.Data.MySQL /// /// /// - private TaskInventoryItem buildItem(DataRow row) + private static TaskInventoryItem buildItem(DataRow row) { TaskInventoryItem taskItem = new TaskInventoryItem(); @@ -966,7 +966,7 @@ namespace OpenSim.Data.MySQL return taskItem; } - private LandData buildLandData(DataRow row) + private static LandData buildLandData(DataRow row) { LandData newData = new LandData(); @@ -1018,7 +1018,7 @@ namespace OpenSim.Data.MySQL return newData; } - private ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) + private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); entry.AgentID = new LLUUID((string) row["AccessUUID"]); @@ -1027,7 +1027,7 @@ namespace OpenSim.Data.MySQL return entry; } - private Array serializeTerrain(double[,] val) + private static Array serializeTerrain(double[,] val) { MemoryStream str = new MemoryStream(65536*sizeof (double)); BinaryWriter bw = new BinaryWriter(str); @@ -1116,7 +1116,7 @@ namespace OpenSim.Data.MySQL } } - private void fillItemRow(DataRow row, TaskInventoryItem taskItem) + private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) { row["itemID"] = taskItem.ItemID; row["primID"] = taskItem.ParentPartID; @@ -1140,7 +1140,7 @@ namespace OpenSim.Data.MySQL row["groupPermissions"] = taskItem.GroupMask; } - private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) + private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) { row["UUID"] = Util.ToRawUuidString(land.globalID); row["RegionUUID"] = Util.ToRawUuidString(regionUUID); @@ -1179,7 +1179,7 @@ namespace OpenSim.Data.MySQL row["AuthBuyerID"] = land.authBuyerID; } - private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) + private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) { row["LandUUID"] = Util.ToRawUuidString(parcelID); row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); @@ -1364,7 +1364,7 @@ namespace OpenSim.Data.MySQL * **********************************************************************/ - private MySqlCommand createInsertCommand(string table, DataTable dt) + private static MySqlCommand createInsertCommand(string table, DataTable dt) { /** * This is subtle enough to deserve some commentary. @@ -1399,7 +1399,7 @@ namespace OpenSim.Data.MySQL return cmd; } - private MySqlCommand createUpdateCommand(string table, string pk, DataTable dt) + private static MySqlCommand createUpdateCommand(string table, string pk, DataTable dt) { string sql = "update " + table + " set "; string subsql = String.Empty; @@ -1426,7 +1426,7 @@ namespace OpenSim.Data.MySQL return cmd; } - private string defineTable(DataTable dt) + private static string defineTable(DataTable dt) { string sql = "create table " + dt.TableName + "("; string subsql = String.Empty; @@ -1471,7 +1471,7 @@ namespace OpenSim.Data.MySQL /// for us. /// ///a built MySql parameter - private MySqlParameter createMySqlParameter(string name, Type type) + private static MySqlParameter createMySqlParameter(string name, Type type) { MySqlParameter param = new MySqlParameter(); param.ParameterName = "?" + name; @@ -1546,7 +1546,7 @@ namespace OpenSim.Data.MySQL da.DeleteCommand = delete; } - private void InitDB(MySqlConnection conn) + private static void InitDB(MySqlConnection conn) { string createPrims = defineTable(createPrimTable()); string createShapes = defineTable(createShapeTable()); @@ -1734,7 +1734,7 @@ namespace OpenSim.Data.MySQL * **********************************************************************/ - private DbType dbtypeFromType(Type type) + private static DbType dbtypeFromType(Type type) { if (type == typeof (String)) { @@ -1768,7 +1768,7 @@ namespace OpenSim.Data.MySQL // this is something we'll need to implement for each db // slightly differently. - private string MySqlType(Type type) + private static string MySqlType(Type type) { if (type == typeof (String)) { diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index 592ade9..c9765c0 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs @@ -314,7 +314,7 @@ namespace OpenSim.Data.MySQL /// /// The SQL Result /// the item read - private InventoryItemBase readInventoryItem(MySqlDataReader reader) + private static InventoryItemBase readInventoryItem(MySqlDataReader reader) { try { @@ -438,7 +438,7 @@ namespace OpenSim.Data.MySQL /// /// A MySQL Data Reader /// A List containing inventory folders - protected InventoryFolderBase readInventoryFolder(MySqlDataReader reader) + protected static InventoryFolderBase readInventoryFolder(MySqlDataReader reader) { try { diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs index c0fe26c..ece1c2d 100644 --- a/OpenSim/Data/NHibernate/NHibernateUserData.cs +++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs @@ -111,7 +111,7 @@ namespace OpenSim.Data.NHibernate } } - private void SetAgentData(LLUUID uuid, UserAgentData agent, ISession session) + private static void SetAgentData(LLUUID uuid, UserAgentData agent, ISession session) { if (agent == null) { diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs index db4848a..fa5d5e2 100644 --- a/OpenSim/Data/SQLite/SQLiteAssetData.cs +++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs @@ -135,7 +135,7 @@ namespace OpenSim.Data.SQLite } - private void LogAssetLoad(AssetBase asset) + private static void LogAssetLoad(AssetBase asset) { string temporary = asset.Temporary ? "Temporary" : "Stored"; string local = asset.Local ? "Local" : "Remote"; @@ -197,7 +197,7 @@ namespace OpenSim.Data.SQLite * **********************************************************************/ - private DataTable createAssetsTable() + private static DataTable createAssetsTable() { DataTable assets = new DataTable("assets"); @@ -222,7 +222,7 @@ namespace OpenSim.Data.SQLite * **********************************************************************/ - private AssetBase buildAsset(IDataReader row) + private static AssetBase buildAsset(IDataReader row) { // TODO: this doesn't work yet because something more // interesting has to be done to actually get these values @@ -250,14 +250,14 @@ namespace OpenSim.Data.SQLite * **********************************************************************/ - private void InitDB(SqliteConnection conn) + private static void InitDB(SqliteConnection conn) { string createAssets = SQLiteUtil.defineTable(createAssetsTable()); SqliteCommand pcmd = new SqliteCommand(createAssets, conn); pcmd.ExecuteNonQuery(); } - private bool TestTables(SqliteConnection conn) + private static bool TestTables(SqliteConnection conn) { SqliteCommand cmd = new SqliteCommand(assetSelect, conn); SqliteDataAdapter pDa = new SqliteDataAdapter(cmd); diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs index 4b28795..40978da 100644 --- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs @@ -124,7 +124,7 @@ namespace OpenSim.Data.SQLite return item; } - private void fillItemRow(DataRow row, InventoryItemBase item) + private static void fillItemRow(DataRow row, InventoryItemBase item) { row["UUID"] = Util.ToRawUuidString(item.ID); row["assetID"] = Util.ToRawUuidString(item.AssetID); @@ -576,7 +576,7 @@ namespace OpenSim.Data.SQLite return inv; } - private DataTable createInventoryFoldersTable() + private static DataTable createInventoryFoldersTable() { DataTable fol = new DataTable("inventoryfolders"); @@ -625,7 +625,7 @@ namespace OpenSim.Data.SQLite } } - private InventoryFolderBase buildFolder(DataRow row) + private static InventoryFolderBase buildFolder(DataRow row) { InventoryFolderBase folder = new InventoryFolderBase(); folder.ID = new LLUUID((string) row["UUID"]); @@ -637,7 +637,7 @@ namespace OpenSim.Data.SQLite return folder; } - private void fillFolderRow(DataRow row, InventoryFolderBase folder) + private static void fillFolderRow(DataRow row, InventoryFolderBase folder) { row["UUID"] = Util.ToRawUuidString(folder.ID); row["name"] = folder.Name; @@ -647,7 +647,7 @@ namespace OpenSim.Data.SQLite row["version"] = folder.Version; } - private void moveFolderRow(DataRow row, InventoryFolderBase folder) + private static void moveFolderRow(DataRow row, InventoryFolderBase folder) { row["UUID"] = Util.ToRawUuidString(folder.ID); row["parentID"] = Util.ToRawUuidString(folder.ParentID); @@ -659,7 +659,7 @@ namespace OpenSim.Data.SQLite * **********************************************************************/ - private void InitDB(SqliteConnection conn) + private static void InitDB(SqliteConnection conn) { string createInventoryItems = defineTable(createInventoryItemsTable()); string createInventoryFolders = defineTable(createInventoryFoldersTable()); @@ -671,7 +671,7 @@ namespace OpenSim.Data.SQLite scmd.ExecuteNonQuery(); } - private bool TestTables(SqliteConnection conn) + private static bool TestTables(SqliteConnection conn) { SqliteCommand invItemsSelectCmd = new SqliteCommand(invItemsSelect, conn); SqliteDataAdapter pDa = new SqliteDataAdapter(invItemsSelectCmd); diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index ea12a48..9a610a4 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs @@ -572,13 +572,13 @@ namespace OpenSim.Data.SQLite * **********************************************************************/ - private void createCol(DataTable dt, string name, Type type) + private static void createCol(DataTable dt, string name, Type type) { DataColumn col = new DataColumn(name, type); dt.Columns.Add(col); } - private DataTable createTerrainTable() + private static DataTable createTerrainTable() { DataTable terrain = new DataTable("terrain"); @@ -589,7 +589,7 @@ namespace OpenSim.Data.SQLite return terrain; } - private DataTable createPrimTable() + private static DataTable createPrimTable() { DataTable prims = new DataTable("prims"); @@ -653,7 +653,7 @@ namespace OpenSim.Data.SQLite return prims; } - private DataTable createShapeTable() + private static DataTable createShapeTable() { DataTable shapes = new DataTable("primshapes"); createCol(shapes, "UUID", typeof (String)); @@ -695,7 +695,7 @@ namespace OpenSim.Data.SQLite return shapes; } - private DataTable createItemsTable() + private static DataTable createItemsTable() { DataTable items = new DataTable("primitems"); @@ -727,7 +727,7 @@ namespace OpenSim.Data.SQLite return items; } - private DataTable createLandTable() + private static DataTable createLandTable() { DataTable land = new DataTable("land"); createCol(land, "UUID", typeof (String)); @@ -771,7 +771,7 @@ namespace OpenSim.Data.SQLite return land; } - private DataTable createLandAccessListTable() + private static DataTable createLandAccessListTable() { DataTable landaccess = new DataTable("landaccesslist"); createCol(landaccess, "LandUUID", typeof (String)); @@ -901,7 +901,7 @@ namespace OpenSim.Data.SQLite /// /// /// - private TaskInventoryItem buildItem(DataRow row) + private static TaskInventoryItem buildItem(DataRow row) { TaskInventoryItem taskItem = new TaskInventoryItem(); @@ -1008,7 +1008,7 @@ namespace OpenSim.Data.SQLite return newData; } - private ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) + private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row) { ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); entry.AgentID = new LLUUID((string) row["AccessUUID"]); @@ -1017,7 +1017,7 @@ namespace OpenSim.Data.SQLite return entry; } - private Array serializeTerrain(double[,] val) + private static Array serializeTerrain(double[,] val) { MemoryStream str = new MemoryStream(65536*sizeof (double)); BinaryWriter bw = new BinaryWriter(str); @@ -1046,7 +1046,7 @@ namespace OpenSim.Data.SQLite // row["Heightfield"] = str.ToArray(); // } - private void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) + private static void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) { row["UUID"] = Util.ToRawUuidString(prim.UUID); row["RegionUUID"] = Util.ToRawUuidString(regionUUID); @@ -1106,7 +1106,7 @@ namespace OpenSim.Data.SQLite row["SitTargetOrientZ"] = sitTargetOrient.Z; } - private void fillItemRow(DataRow row, TaskInventoryItem taskItem) + private static void fillItemRow(DataRow row, TaskInventoryItem taskItem) { row["itemID"] = taskItem.ItemID; row["primID"] = taskItem.ParentPartID; @@ -1130,7 +1130,7 @@ namespace OpenSim.Data.SQLite row["groupPermissions"] = taskItem.GroupMask; } - private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) + private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) { row["UUID"] = Util.ToRawUuidString(land.globalID); row["RegionUUID"] = Util.ToRawUuidString(regionUUID); @@ -1169,7 +1169,7 @@ namespace OpenSim.Data.SQLite row["AuthbuyerID"] = Util.ToRawUuidString(land.authBuyerID); } - private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) + private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID) { row["LandUUID"] = Util.ToRawUuidString(parcelID); row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID); @@ -1242,7 +1242,7 @@ namespace OpenSim.Data.SQLite return s; } - private void fillShapeRow(DataRow row, SceneObjectPart prim) + private static void fillShapeRow(DataRow row, SceneObjectPart prim) { PrimitiveBaseShape s = prim.Shape; row["UUID"] = Util.ToRawUuidString(prim.UUID); @@ -1713,7 +1713,7 @@ namespace OpenSim.Data.SQLite * **********************************************************************/ - private DbType dbtypeFromType(Type type) + private static DbType dbtypeFromType(Type type) { if (type == typeof (String)) { @@ -1747,7 +1747,7 @@ namespace OpenSim.Data.SQLite // this is something we'll need to implement for each db // slightly differently. - private string sqliteType(Type type) + private static string sqliteType(Type type) { if (type == typeof (String)) { diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index ec90f34..7f017b7 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs @@ -752,7 +752,7 @@ namespace OpenSim.Data.SQLite } - private void InitDB(SqliteConnection conn) + private static void InitDB(SqliteConnection conn) { string createUsers = SQLiteUtil.defineTable(createUsersTable()); string createFriends = SQLiteUtil.defineTable(createUserFriendsTable()); diff --git a/OpenSim/Region/Application/OpenSimMainConsole.cs b/OpenSim/Region/Application/OpenSimMainConsole.cs index ac5a1ec..e727d63 100644 --- a/OpenSim/Region/Application/OpenSimMainConsole.cs +++ b/OpenSim/Region/Application/OpenSimMainConsole.cs @@ -172,7 +172,7 @@ namespace OpenSim } } - private void PrintFileToConsole(string fileName) + private static void PrintFileToConsole(string fileName) { if (File.Exists(fileName)) { @@ -690,7 +690,7 @@ namespace OpenSim } } - private string CombineParams(string[] commandParams, int pos) + private static string CombineParams(string[] commandParams, int pos) { string result = String.Empty; for (int i = pos; i < commandParams.Length; i++) diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs index 72c10f3..c4a721e 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs @@ -337,7 +337,7 @@ namespace OpenSim.DataStore.MSSQL * **********************************************************************/ - private void createCol(DataTable dt, string name, Type type) + private static void createCol(DataTable dt, string name, Type type) { DataColumn col = new DataColumn(name, type); dt.Columns.Add(col); @@ -467,7 +467,7 @@ namespace OpenSim.DataStore.MSSQL * **********************************************************************/ - private SceneObjectPart buildPrim(DataRow row) + private static SceneObjectPart buildPrim(DataRow row) { // TODO: this doesn't work yet because something more // interesting has to be done to actually get these values @@ -553,7 +553,7 @@ namespace OpenSim.DataStore.MSSQL } - private void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) + private static void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) { row["UUID"] = prim.UUID; row["RegionUUID"] = regionUUID; -- cgit v1.1