* PROTIP: It helps to know what your doing when playing with reflection.

afrisby
Adam Frisby 2007-07-15 17:32:54 +00:00
parent 813cdd0c80
commit aebd58d75e
2 changed files with 9 additions and 12 deletions

View File

@ -38,20 +38,17 @@ namespace OpenSim.Region.Environment
{ {
if (pluginType.IsPublic) 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) m_dataStore = plug;
{
IRegionDataStore plug = (IRegionDataStore)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
plug.Initialise(dataStoreFile, dataStoreDB);
m_dataStore = plug;
}
typeInterface = null;
} }
typeInterface = null;
} }
} }

View File

@ -10,7 +10,7 @@ using libsecondlife;
namespace OpenSim.DataStore.NullStorage namespace OpenSim.DataStore.NullStorage
{ {
class NullDataStore : IRegionDataStore public class NullDataStore : IRegionDataStore
{ {
public void Initialise(string dbfile, string dbname) public void Initialise(string dbfile, string dbname)
{ {