diff options
author | Diva Canto | 2011-03-08 09:02:29 -0800 |
---|---|---|
committer | Diva Canto | 2011-03-08 09:02:29 -0800 |
commit | 9923a2ff1002d722ccebea8bf4d71718ed4e2a03 (patch) | |
tree | 5181ed92a1bc682cd5d7ae383bf016fd6b8b6865 /OpenSim/Data/MySQL/MySQLRegionData.cs | |
parent | factor out SetPartMediaFlags() function in MoapModule. (diff) | |
download | opensim-SC_OLD-9923a2ff1002d722ccebea8bf4d71718ed4e2a03.zip opensim-SC_OLD-9923a2ff1002d722ccebea8bf4d71718ed4e2a03.tar.gz opensim-SC_OLD-9923a2ff1002d722ccebea8bf4d71718ed4e2a03.tar.bz2 opensim-SC_OLD-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/MySQLRegionData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index d04e3dc..c20c392 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -29,6 +29,8 @@ using System; | |||
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Data; | 31 | using System.Data; |
32 | using System.Reflection; | ||
33 | |||
32 | using OpenMetaverse; | 34 | using OpenMetaverse; |
33 | using OpenSim.Framework; | 35 | using OpenSim.Framework; |
34 | using OpenSim.Data; | 36 | using OpenSim.Data; |
@@ -42,6 +44,11 @@ namespace OpenSim.Data.MySQL | |||
42 | private List<string> m_ColumnNames; | 44 | private List<string> m_ColumnNames; |
43 | //private string m_connectionString; | 45 | //private string m_connectionString; |
44 | 46 | ||
47 | protected virtual Assembly Assembly | ||
48 | { | ||
49 | get { return GetType().Assembly; } | ||
50 | } | ||
51 | |||
45 | public MySqlRegionData(string connectionString, string realm) | 52 | public MySqlRegionData(string connectionString, string realm) |
46 | : base(connectionString) | 53 | : base(connectionString) |
47 | { | 54 | { |
@@ -51,7 +58,7 @@ namespace OpenSim.Data.MySQL | |||
51 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) | 58 | using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) |
52 | { | 59 | { |
53 | dbcon.Open(); | 60 | dbcon.Open(); |
54 | Migration m = new Migration(dbcon, GetType().Assembly, "GridStore"); | 61 | Migration m = new Migration(dbcon, Assembly, "GridStore"); |
55 | m.Update(); | 62 | m.Update(); |
56 | } | 63 | } |
57 | } | 64 | } |