From e0e0db366061eae148364e3d5670f275b1ab25b7 Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Fri, 18 Jul 2008 04:51:41 +0000 Subject: Thanks, sempuki, for a patch that moves all grid plugins to new PluginLoader (issue 1763). --- OpenSim/Data/MSSQL/MSSQLGridData.cs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'OpenSim/Data/MSSQL/MSSQLGridData.cs') diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs index 0abd0d0..7de77d1 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs @@ -33,12 +33,18 @@ using System.Security.Cryptography; using System.Text; using libsecondlife; using log4net; +using Mono.Addins; +using OpenSim.Framework; + +[assembly : Addin] +[assembly : AddinDependency("OpenSim.Data", "0.5")] namespace OpenSim.Data.MSSQL { /// /// A grid data interface for MSSQL Server /// + [Extension("/OpenSim/GridDataStore")] public class MSSQLGridData : GridDataBase { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -50,6 +56,12 @@ namespace OpenSim.Data.MSSQL private string m_regionsTableName; + override public void Initialise() + { + m_log.Info("[MSSQLGridData]: " + Name + " cannot be default-initialized!"); + throw new PluginNotInitialisedException (Name); + } + /// /// Initialises the Grid Interface /// @@ -101,7 +113,7 @@ namespace OpenSim.Data.MSSQL /// /// Shuts down the grid interface /// - override public void Close() + override public void Dispose() { // nothing to close } @@ -110,18 +122,18 @@ namespace OpenSim.Data.MSSQL /// The name of this DB provider. /// /// A string containing the storage system name - override public string getName() + override public string Name { - return "Sql OpenGridData"; + get { return "Sql OpenGridData"; } } /// /// Database provider version. /// /// A string containing the storage system version - override public string getVersion() + override public string Version { - return "0.1"; + get { return "0.1"; } } /// -- cgit v1.1