From aebd58d75e7e4c46c074cb8266481850f4841cb9 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 15 Jul 2007 17:32:54 +0000 Subject: [PATCH] * PROTIP: It helps to know what your doing when playing with reflection. --- OpenSim/Region/Environment/StorageManager.cs | 19 ++++++++----------- .../NullDataStore.cs | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs index 9f2730fe39..8f8ac97206 100644 --- a/OpenSim/Region/Environment/StorageManager.cs +++ b/OpenSim/Region/Environment/StorageManager.cs @@ -38,20 +38,17 @@ namespace OpenSim.Region.Environment { if (pluginType.IsPublic) { - if (!pluginType.IsAbstract) + Type typeInterface = pluginType.GetInterface("IRegionDataStore", true); + + if (typeInterface != null) { - Type typeInterface = pluginType.GetInterface("IRegionDataStore", true); + IRegionDataStore plug = (IRegionDataStore)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); + plug.Initialise(dataStoreFile, dataStoreDB); - if (typeInterface != null) - { - IRegionDataStore plug = (IRegionDataStore)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); - plug.Initialise(dataStoreFile, dataStoreDB); - - m_dataStore = plug; - } - - typeInterface = null; + m_dataStore = plug; } + + typeInterface = null; } } diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs index 8542ef3b81..7c8bd07031 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.NullStorage/NullDataStore.cs @@ -10,7 +10,7 @@ using libsecondlife; namespace OpenSim.DataStore.NullStorage { - class NullDataStore : IRegionDataStore + public class NullDataStore : IRegionDataStore { public void Initialise(string dbfile, string dbname) {