PGSQL: since we mya not have mono, our mono.security.dll must be on bin folder

This commit is contained in:
UbitUmarov
2023-04-11 17:55:28 +01:00
parent 286df1d467
commit 9686af7944
4 changed files with 2 additions and 58 deletions

View File

@@ -43,7 +43,7 @@ namespace OpenSim.Data.PGSQL
/// </summary>
public class PGSQLManager
{
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
/// Connection string for ADO.net
@@ -57,34 +57,6 @@ namespace OpenSim.Data.PGSQL
public PGSQLManager(string connection)
{
connectionString = connection;
InitializeMonoSecurity();
}
public void InitializeMonoSecurity()
{
if (!Util.IsPlatformMono)
{
if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
{
AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
}
}
}
private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
{
Assembly MyAssembly = null;
if (args.Name.Substring(0, args.Name.IndexOf(",")) == "Mono.Security")
{
MyAssembly = Assembly.LoadFrom("lib/NET/Mono.Security.dll");
}
//Return the loaded assembly.
return MyAssembly;
}
/// <summary>