From b9c07730f5216e8baa61185437cc5023d8c70200 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Thu, 20 Nov 2008 19:52:55 +0000
Subject: * refactor: change some method names and doc in the physics plugin
manager * move the directory choice for plugins outside into
RegionApplicationBase
---
.../Region/Physics/Manager/PhysicsPluginManager.cs | 26 +++++++++++-----------
1 file changed, 13 insertions(+), 13 deletions(-)
(limited to 'OpenSim/Region/Physics/Manager')
diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
index 71fad02..428a586 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs
@@ -104,26 +104,26 @@ namespace OpenSim.Region.Physics.Manager
}
///
- /// Load all built-in 'plugins' and those in the bin/Physics diretory
+ /// Load all plugins in assemblies at the given path
///
- public void LoadPlugins()
+ ///
+ public void LoadPluginsFromAssemblies(string assembliesPath)
{
- // And now walk all assemblies (DLLs effectively) and see if they are home
+ // Walk all assemblies (DLLs effectively) and see if they are home
// of a plugin that is of interest for us
- string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Physics");
- string[] pluginFiles = Directory.GetFiles(path, "*.dll");
+ string[] pluginFiles = Directory.GetFiles(assembliesPath, "*.dll");
for (int i = 0; i < pluginFiles.Length; i++)
{
- LoadPlugin(pluginFiles[i]);
+ LoadPluginsFromAssembly(pluginFiles[i]);
}
}
///
- /// Load plugins from a dll at the given path
+ /// Load plugins from an assembly at the given path
///
- ///
- public void LoadPlugin(string dllPath)
+ ///
+ public void LoadPluginsFromAssembly(string assemblyPath)
{
// TODO / NOTE
// The assembly named 'OpenSim.Region.Physics.BasicPhysicsPlugin' was loaded from
@@ -138,11 +138,11 @@ namespace OpenSim.Region.Physics.Manager
try
{
- pluginAssembly = Assembly.LoadFrom(dllPath);
+ pluginAssembly = Assembly.LoadFrom(assemblyPath);
}
catch (Exception ex)
{
- m_log.Error("[PHYSICS]: Failed to load plugin from " + dllPath, ex);
+ m_log.Error("[PHYSICS]: Failed to load plugin from " + assemblyPath, ex);
}
if (pluginAssembly != null)
@@ -153,12 +153,12 @@ namespace OpenSim.Region.Physics.Manager
}
catch (ReflectionTypeLoadException ex)
{
- m_log.Error("[PHYSICS]: Failed to enumerate types in plugin from " + dllPath + ": " +
+ m_log.Error("[PHYSICS]: Failed to enumerate types in plugin from " + assemblyPath + ": " +
ex.LoaderExceptions[0].Message, ex);
}
catch (Exception ex)
{
- m_log.Error("[PHYSICS]: Failed to enumerate types in plugin from " + dllPath, ex);
+ m_log.Error("[PHYSICS]: Failed to enumerate types in plugin from " + assemblyPath, ex);
}
if (types != null)
--
cgit v1.1