diff options
author | Marck | 2011-06-30 20:05:02 +0200 |
---|---|---|
committer | Marck | 2011-07-16 09:49:38 +0200 |
commit | dd2564d7ecd4fa628daaacfd612c1a8c3e0ef309 (patch) | |
tree | 8692f848f8ee55db8745c2f975bdbadf29fddb1c /OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs | |
parent | Replace ifs in SOG.GroupResize() with Math.Min() (diff) | |
download | opensim-SC-dd2564d7ecd4fa628daaacfd612c1a8c3e0ef309.zip opensim-SC-dd2564d7ecd4fa628daaacfd612c1a8c3e0ef309.tar.gz opensim-SC-dd2564d7ecd4fa628daaacfd612c1a8c3e0ef309.tar.bz2 opensim-SC-dd2564d7ecd4fa628daaacfd612c1a8c3e0ef309.tar.xz |
refactor: Pull up Assembly of the SQLite 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 a refactor similar to commit 9923a2ff1002d722ccebea8bf4d71718ed4e2a03 for MySQL -- no functional changes.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs index 0d7ae1f..4f977a8 100644 --- a/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs +++ b/OpenSim/Data/SQLite/SQLiteGenericTableHandler.cs | |||
@@ -55,6 +55,11 @@ namespace OpenSim.Data.SQLite | |||
55 | protected static SqliteConnection m_Connection; | 55 | protected static SqliteConnection m_Connection; |
56 | private static bool m_initialized; | 56 | private static bool m_initialized; |
57 | 57 | ||
58 | protected virtual Assembly Assembly | ||
59 | { | ||
60 | get { return GetType().Assembly; } | ||
61 | } | ||
62 | |||
58 | public SQLiteGenericTableHandler(string connectionString, | 63 | public SQLiteGenericTableHandler(string connectionString, |
59 | string realm, string storeName) : base(connectionString) | 64 | string realm, string storeName) : base(connectionString) |
60 | { | 65 | { |
@@ -68,13 +73,12 @@ namespace OpenSim.Data.SQLite | |||
68 | 73 | ||
69 | if (storeName != String.Empty) | 74 | if (storeName != String.Empty) |
70 | { | 75 | { |
71 | Assembly assem = GetType().Assembly; | ||
72 | //SqliteConnection newConnection = | 76 | //SqliteConnection newConnection = |
73 | // (SqliteConnection)((ICloneable)m_Connection).Clone(); | 77 | // (SqliteConnection)((ICloneable)m_Connection).Clone(); |
74 | //newConnection.Open(); | 78 | //newConnection.Open(); |
75 | 79 | ||
76 | //Migration m = new Migration(newConnection, assem, storeName); | 80 | //Migration m = new Migration(newConnection, Assembly, storeName); |
77 | Migration m = new Migration(m_Connection, assem, storeName); | 81 | Migration m = new Migration(m_Connection, Assembly, storeName); |
78 | m.Update(); | 82 | m.Update(); |
79 | //newConnection.Close(); | 83 | //newConnection.Close(); |
80 | //newConnection.Dispose(); | 84 | //newConnection.Dispose(); |