From 9923a2ff1002d722ccebea8bf4d71718ed4e2a03 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 8 Mar 2011 09:02:29 -0800 Subject: 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. --- OpenSim/Data/MySQL/MySQLRegionData.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Data/MySQL/MySQLRegionData.cs') 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; using System.Collections; using System.Collections.Generic; using System.Data; +using System.Reflection; + using OpenMetaverse; using OpenSim.Framework; using OpenSim.Data; @@ -42,6 +44,11 @@ namespace OpenSim.Data.MySQL private List m_ColumnNames; //private string m_connectionString; + protected virtual Assembly Assembly + { + get { return GetType().Assembly; } + } + public MySqlRegionData(string connectionString, string realm) : base(connectionString) { @@ -51,7 +58,7 @@ namespace OpenSim.Data.MySQL using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { dbcon.Open(); - Migration m = new Migration(dbcon, GetType().Assembly, "GridStore"); + Migration m = new Migration(dbcon, Assembly, "GridStore"); m.Update(); } } -- cgit v1.1