https://bugzilla.novell.com/show_bug.cgi?id=346425


           Summary: AppDomain.ReflectionOnlyAssemblyResolve doesn't fire
           Product: Mono: Runtime
           Version: 1.2.6
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [EMAIL PROTECTED]
          Found By: ---


This program fails on Mono because AppDomain.ReflectionOnlyAssemblyResolve
isn't implemented. (BTW, it fails with the wrong exception, GetTypes() should
be throwing System.Reflection.ReflectionTypeLoadException)

using System;
using System.Reflection;

namespace MonoReflectionOnly
{
        class Program
        {
                static void Main(string[] args)
                {
                        AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve
+= new ResolveEventHandler(CurrentDomain_ReflectionOnlyAssemblyResolve);
                        Assembly asm =
Assembly.ReflectionOnlyLoad(Assembly.LoadWithPartialName("System").FullName);
                        asm.GetTypes();
                }

                static Assembly
CurrentDomain_ReflectionOnlyAssemblyResolve(object sender, ResolveEventArgs
args)
                {
                        Console.WriteLine(args.Name);
                        return Assembly.ReflectionOnlyLoad(args.Name);
                }
        }
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to