* One More thing, add an appdomain data element to ensure that we don't duplicate the assembly resolving.
parent
8fdf70b87e
commit
f83343d302
|
@ -58,10 +58,16 @@ namespace OpenSim.Data.PGSQL
|
||||||
{
|
{
|
||||||
if (!Util.IsPlatformMono)
|
if (!Util.IsPlatformMono)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
|
||||||
|
{
|
||||||
|
AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
|
||||||
|
|
||||||
AppDomain currentDomain = AppDomain.CurrentDomain;
|
AppDomain currentDomain = AppDomain.CurrentDomain;
|
||||||
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
|
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
|
private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
|
||||||
{
|
{
|
||||||
|
|
|
@ -64,10 +64,15 @@ namespace OpenSim.Data.PGSQL
|
||||||
{
|
{
|
||||||
if (!Util.IsPlatformMono)
|
if (!Util.IsPlatformMono)
|
||||||
{
|
{
|
||||||
|
if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null)
|
||||||
|
{
|
||||||
|
AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true");
|
||||||
|
|
||||||
AppDomain currentDomain = AppDomain.CurrentDomain;
|
AppDomain currentDomain = AppDomain.CurrentDomain;
|
||||||
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
|
currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
|
private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue