* One More thing, add an appdomain data element to ensure that we don't duplicate the assembly resolving.

link-sitting
Fernando Oliveira 2013-10-16 21:20:11 -05:00 committed by fernando
parent 8fdf70b87e
commit f83343d302
2 changed files with 15 additions and 4 deletions

View File

@ -58,8 +58,14 @@ namespace OpenSim.Data.PGSQL
{
if (!Util.IsPlatformMono)
{
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
{
AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
}
}
}

View File

@ -64,8 +64,13 @@ namespace OpenSim.Data.PGSQL
{
if (!Util.IsPlatformMono)
{
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
{
AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
}
}
}