From ca8d1d57e1bbf49cb52abe81b3a7246dacbe9b03 Mon Sep 17 00:00:00 2001
From: Charles Krinke
Date: Fri, 27 Jun 2008 02:15:57 +0000
Subject: Mantis#1591. Thank you graciously, Sempuki for a patch that:
Currently module loading is done ad-hoc. I propose creating a simple loader
class that leverages Mono.Addins (and perhaps the new .NET addins when they
become available in mono). Attached is a basic patch for review that compiles
into HEAD, but doesn't yet replace any existing ad-hoc loaders.
---
OpenSim/Framework/IPlugin.cs | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Framework/IPlugin.cs')
diff --git a/OpenSim/Framework/IPlugin.cs b/OpenSim/Framework/IPlugin.cs
index 8a0b2b1..342918c 100644
--- a/OpenSim/Framework/IPlugin.cs
+++ b/OpenSim/Framework/IPlugin.cs
@@ -25,12 +25,24 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+using System;
+
namespace OpenSim.Framework
{
///
+ /// Exception thrown if Initialise has been called, but failed.
+ ///
+ public class PluginNotInitialisedException : Exception
+ {
+ public PluginNotInitialisedException () : base() {}
+ public PluginNotInitialisedException (string msg) : base(msg) {}
+ public PluginNotInitialisedException (string msg, Exception e) : base(msg, e) {}
+ }
+
+ ///
/// This interface, describes a generic plugin
///
- public interface IPlugin
+ public interface IPlugin : System.IDisposable
{
///
/// Returns the plugin version
@@ -45,8 +57,8 @@ namespace OpenSim.Framework
string Name { get; }
///
- /// Initialises the plugin (artificial constructor)
+ /// Default-initialises the plugin
///
void Initialise();
}
-}
\ No newline at end of file
+}
--
cgit v1.1