mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
Thanks, sempuki, for a patch that moves all Grid Server's plugins to
PluginLoader. Fix issue 1871.
This commit is contained in:
@@ -96,6 +96,11 @@ namespace OpenSim.Framework
|
||||
get { return loaded; }
|
||||
}
|
||||
|
||||
public T Plugin
|
||||
{
|
||||
get { return (loaded.Count == 1)? loaded [0] : default (T); }
|
||||
}
|
||||
|
||||
public PluginLoader ()
|
||||
{
|
||||
Initialiser = new PluginInitialiserBase();
|
||||
@@ -114,11 +119,26 @@ namespace OpenSim.Framework
|
||||
initialise_plugin_dir_ (dir);
|
||||
}
|
||||
|
||||
public void AddExtensionPoint (string extpoint)
|
||||
public void Add (string extpoint)
|
||||
{
|
||||
if (extpoints.Contains (extpoint))
|
||||
return;
|
||||
|
||||
extpoints.Add (extpoint);
|
||||
}
|
||||
|
||||
public void Add (string extpoint, IPluginConstraint cons)
|
||||
{
|
||||
Add (extpoint);
|
||||
AddConstraint (extpoint, cons);
|
||||
}
|
||||
|
||||
public void Add (string extpoint, IPluginFilter filter)
|
||||
{
|
||||
Add (extpoint);
|
||||
AddFilter (extpoint, filter);
|
||||
}
|
||||
|
||||
public void AddConstraint (string extpoint, IPluginConstraint cons)
|
||||
{
|
||||
constraints.Add (extpoint, cons);
|
||||
@@ -131,7 +151,7 @@ namespace OpenSim.Framework
|
||||
|
||||
public void Load (string extpoint)
|
||||
{
|
||||
AddExtensionPoint (extpoint);
|
||||
Add (extpoint);
|
||||
Load();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user