From 23ec21e44a2d7227ca56c31622e9b9b754e52879 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Fri, 4 Jul 2008 03:11:53 +0000 Subject: Mantis#1647. Thank you very much, Sempuki for a patch that: Updates the previous module loader work. --- OpenSim/Framework/IPlugin.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/IPlugin.cs') diff --git a/OpenSim/Framework/IPlugin.cs b/OpenSim/Framework/IPlugin.cs index 342918c..f739177 100644 --- a/OpenSim/Framework/IPlugin.cs +++ b/OpenSim/Framework/IPlugin.cs @@ -38,7 +38,7 @@ namespace OpenSim.Framework public PluginNotInitialisedException (string msg) : base(msg) {} public PluginNotInitialisedException (string msg, Exception e) : base(msg, e) {} } - + /// /// This interface, describes a generic plugin /// @@ -61,4 +61,20 @@ namespace OpenSim.Framework /// void Initialise(); } + + /// + /// Any plugins which need to pass parameters to their initialisers must + /// inherit this class and use it to set the PluginLoader Initialiser property + /// + public class PluginInitialiserBase + { + // this would be a lot simpler if C# supported currying or typedefs + + // default initialisation + public virtual void Initialise (IPlugin plugin) + { + plugin.Initialise(); + } + } + } -- cgit v1.1