aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLAssetData.cs
diff options
context:
space:
mode:
authorDiva Canto2011-03-08 09:02:29 -0800
committerDiva Canto2011-03-08 09:02:29 -0800
commit9923a2ff1002d722ccebea8bf4d71718ed4e2a03 (patch)
tree5181ed92a1bc682cd5d7ae383bf016fd6b8b6865 /OpenSim/Data/MySQL/MySQLAssetData.cs
parentfactor out SetPartMediaFlags() function in MoapModule. (diff)
downloadopensim-SC-9923a2ff1002d722ccebea8bf4d71718ed4e2a03.zip
opensim-SC-9923a2ff1002d722ccebea8bf4d71718ed4e2a03.tar.gz
opensim-SC-9923a2ff1002d722ccebea8bf4d71718ed4e2a03.tar.bz2
opensim-SC-9923a2ff1002d722ccebea8bf4d71718ed4e2a03.tar.xz
Pull up Assembly of the MySQL classes as a protected property, so that it can be overwritten in subclasses. That way extensions can decide in which assembly migration resources should be looked up. This is just a refactor -- no functional changes whatsoever.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLAssetData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index ed92f3e..e740232 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -47,6 +47,11 @@ namespace OpenSim.Data.MySQL
47 private string m_connectionString; 47 private string m_connectionString;
48 private object m_dbLock = new object(); 48 private object m_dbLock = new object();
49 49
50 protected virtual Assembly Assembly
51 {
52 get { return GetType().Assembly; }
53 }
54
50 #region IPlugin Members 55 #region IPlugin Members
51 56
52 public override string Version { get { return "1.0.0.0"; } } 57 public override string Version { get { return "1.0.0.0"; } }
@@ -66,13 +71,10 @@ namespace OpenSim.Data.MySQL
66 { 71 {
67 m_connectionString = connect; 72 m_connectionString = connect;
68 73
69 // This actually does the roll forward assembly stuff
70 Assembly assem = GetType().Assembly;
71
72 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 74 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
73 { 75 {
74 dbcon.Open(); 76 dbcon.Open();
75 Migration m = new Migration(dbcon, assem, "AssetStore"); 77 Migration m = new Migration(dbcon, Assembly, "AssetStore");
76 m.Update(); 78 m.Update();
77 } 79 }
78 } 80 }