29 using System.Collections;
30 using System.Collections.Generic;
32 using System.Reflection;
34 using OpenSim.Framework;
37 namespace OpenSim.Data.PGSQL
44 private static readonly log4net.ILog m_log =
45 log4net.LogManager.GetLogger(
46 System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
49 protected object m_dbLock =
new object();
53 m_connectionString = connectionString;
54 InitializeMonoSecurity();
59 if (!Util.IsPlatformMono)
62 if (AppDomain.CurrentDomain.GetData(
"MonoSecurityPostgresAdded") == null)
64 AppDomain.CurrentDomain.SetData(
"MonoSecurityPostgresAdded",
"true");
66 AppDomain currentDomain = AppDomain.CurrentDomain;
67 currentDomain.AssemblyResolve +=
new ResolveEventHandler(ResolveEventHandlerMonoSec);
72 private System.Reflection.Assembly ResolveEventHandlerMonoSec(
object sender, ResolveEventArgs args)
74 Assembly MyAssembly = null;
76 if (args.Name.Substring(0, args.Name.IndexOf(
",")) ==
"Mono.Security")
78 MyAssembly = Assembly.LoadFrom(
"lib/NET/Mono.Security.dll");
93 using (NpgsqlConnection dbcon =
new NpgsqlConnection(m_connectionString))
96 cmd.Connection = dbcon;
100 return cmd.ExecuteNonQuery();
104 m_log.Error(e.Message, e);
int ExecuteNonQuery(NpgsqlCommand cmd)
string m_connectionString
A database interface class to a user profile storage system
void InitializeMonoSecurity()
PGSqlFramework(string connectionString)