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/MySQLAuthenticationData.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'OpenSim/Data/MySQL/MySQLAuthenticationData.cs') diff --git a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs index 5056aee..8d82f61 100644 --- a/OpenSim/Data/MySQL/MySQLAuthenticationData.cs +++ b/OpenSim/Data/MySQL/MySQLAuthenticationData.cs @@ -28,6 +28,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Reflection; using System.Data; using OpenMetaverse; using OpenSim.Framework; @@ -42,6 +43,11 @@ namespace OpenSim.Data.MySQL private int m_LastExpire; // private string m_connectionString; + protected virtual Assembly Assembly + { + get { return GetType().Assembly; } + } + public MySqlAuthenticationData(string connectionString, string realm) : base(connectionString) { @@ -51,7 +57,7 @@ namespace OpenSim.Data.MySQL using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) { dbcon.Open(); - Migration m = new Migration(dbcon, GetType().Assembly, "AuthStore"); + Migration m = new Migration(dbcon, Assembly, "AuthStore"); m.Update(); } } -- cgit v1.1