[Mono-bugs] [Bug 58334][Min] New - TypeResolve handler invoked twice

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 11 May 2004 12:32:31 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by shaver@off.net.

http://bugzilla.ximian.com/show_bug.cgi?id=58334

--- shadow/58334	2004-05-11 12:32:31.000000000 -0400
+++ shadow/58334.tmp.21730	2004-05-11 12:32:31.000000000 -0400
@@ -0,0 +1,48 @@
+Bug#: 58334
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: FC2T3, x86 (+updates)
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: shaver@off.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: TypeResolve handler invoked twice
+
+Test case:
+
+using System;
+using System.Reflection;
+
+class Test {
+    public static void Main()
+    {
+        AppDomain currentDomain = AppDomain.CurrentDomain;
+        currentDomain.TypeResolve += new ResolveEventHandler(TypeResolve);
+        Type.GetType("MyType");
+    }
+
+    static Assembly TypeResolve(object sender, ResolveEventArgs args)
+    {
+        Console.WriteLine("TypeResolve run for {0}", args.Name);
+        return null;
+    }
+}
+
+On .NET:
+
+: shaver; ./typeresolve-double-call.exe
+TypeResolve run for MyType
+
+On Mono (today's CVS):
+
+: tests; /opt/mono-cvs/bin/mono --debug typeresolve-double-call.exe
+TypeResolve run for MyType
+TypeResolve run for MyType