diff options
Diffstat (limited to 'OpenSim/Framework/InventoryServiceBase')
-rw-r--r-- | OpenSim/Framework/InventoryServiceBase/InventoryServiceBase.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Framework/InventoryServiceBase/InventoryServiceBase.cs b/OpenSim/Framework/InventoryServiceBase/InventoryServiceBase.cs index dc66bd4..d76fac5 100644 --- a/OpenSim/Framework/InventoryServiceBase/InventoryServiceBase.cs +++ b/OpenSim/Framework/InventoryServiceBase/InventoryServiceBase.cs | |||
@@ -23,28 +23,28 @@ namespace OpenSim.Framework.InventoryServiceBase | |||
23 | /// <param name="FileName">The filename to the user server plugin DLL</param> | 23 | /// <param name="FileName">The filename to the user server plugin DLL</param> |
24 | public void AddPlugin(string FileName) | 24 | public void AddPlugin(string FileName) |
25 | { | 25 | { |
26 | MainLog.Instance.Verbose("Inventory", "Inventorystorage: Attempting to load " + FileName); | 26 | if (!String.IsNullOrEmpty(FileName)) |
27 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | ||
28 | |||
29 | foreach (Type pluginType in pluginAssembly.GetTypes()) | ||
30 | { | 27 | { |
31 | if (!pluginType.IsAbstract) | 28 | MainLog.Instance.Verbose("Inventory", "Inventorystorage: Attempting to load " + FileName); |
32 | { | 29 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
33 | Type typeInterface = pluginType.GetInterface("IInventoryData", true); | ||
34 | 30 | ||
35 | if (typeInterface != null) | 31 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
32 | { | ||
33 | if (!pluginType.IsAbstract) | ||
36 | { | 34 | { |
37 | IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 35 | Type typeInterface = pluginType.GetInterface("IInventoryData", true); |
38 | plug.Initialise(); | 36 | |
39 | this.m_plugins.Add(plug.getName(), plug); | 37 | if (typeInterface != null) |
40 | MainLog.Instance.Verbose("Inventorystorage: Added IInventoryData Interface"); | 38 | { |
39 | IInventoryData plug = | ||
40 | (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
41 | plug.Initialise(); | ||
42 | this.m_plugins.Add(plug.getName(), plug); | ||
43 | MainLog.Instance.Verbose("Inventorystorage: Added IInventoryData Interface"); | ||
44 | } | ||
41 | } | 45 | } |
42 | |||
43 | typeInterface = null; | ||
44 | } | 46 | } |
45 | } | 47 | } |
46 | |||
47 | pluginAssembly = null; | ||
48 | } | 48 | } |
49 | 49 | ||
50 | /// <summary> | 50 | /// <summary> |