mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-09-09 00:13:20 +02: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>
|
||||
|
||||
Fixes BNC#387220.
|
||||
|
@ -24,6 +24,7 @@ namespace GLib {
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@ -158,13 +159,19 @@ namespace GLib {
|
||||
|
||||
visited [asm] = asm;
|
||||
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 ()) {
|
||||
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);
|
||||
if (result != null)
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user