mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-06-25 08:31:24 +00:00
2008-09-08 Mike Kestner <mkestner@novell.com>
* glib/GType.cs: beef up the referenced assembly loading code to handle assemblies located in the same directory as the referring assembly. Fixes #423450. svn path=/trunk/gtk-sharp/; revision=112545
This commit is contained in:
parent
a4bc03d66d
commit
fdfff5bb60
|
@ -1,3 +1,9 @@
|
||||||
|
2008-09-08 Mike Kestner <mkestner@novell.com>
|
||||||
|
|
||||||
|
* glib/GType.cs: beef up the referenced assembly loading code to
|
||||||
|
handle assemblies located in the same directory as the referring
|
||||||
|
assembly. Fixes #423450.
|
||||||
|
|
||||||
2008-09-05 Andrés G. Aragoneses <aaragoneses@novell.com>
|
2008-09-05 Andrés G. Aragoneses <aaragoneses@novell.com>
|
||||||
|
|
||||||
Fixes BNC#387220.
|
Fixes BNC#387220.
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace GLib {
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
|
@ -158,13 +159,19 @@ namespace GLib {
|
||||||
|
|
||||||
visited [asm] = asm;
|
visited [asm] = asm;
|
||||||
Type result = asm.GetType (type_name);
|
Type result = asm.GetType (type_name);
|
||||||
if (result == null)
|
if (result == null) {
|
||||||
|
string asm_dir = Path.GetDirectoryName (asm.Location);
|
||||||
foreach (AssemblyName ref_name in asm.GetReferencedAssemblies ()) {
|
foreach (AssemblyName ref_name in asm.GetReferencedAssemblies ()) {
|
||||||
Assembly ref_asm = Assembly.Load (ref_name);
|
Assembly ref_asm;
|
||||||
|
if (File.Exists (Path.Combine (asm_dir, ref_name.Name + ".dll")))
|
||||||
|
ref_asm = Assembly.LoadFrom (Path.Combine (asm_dir, ref_name.Name + ".dll"));
|
||||||
|
else
|
||||||
|
ref_asm = Assembly.Load (ref_name);
|
||||||
result = FindTypeInReferences (type_name, ref_asm, visited);
|
result = FindTypeInReferences (type_name, ref_asm, visited);
|
||||||
if (result != null)
|
if (result != null)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue