[Mono-list] [patch] System.Reflection.Assemly.GetModules & GetReferencedAssemblies.

Paolo Molaro lupus@ximian.com
Tue, 27 Aug 2002 13:57:02 +0200


On 08/26/02 Tomi Pakarinen wrote:
> I've implemented two methods:
>   System.Reflection.Assembly.GetModules()
>   System.Reflection.Assembly.GetReferencedAssemblies()
> 
> GetModules implementation is not complete, because i couldn't find, how
> to make a difference between resource modules and other kind of modules.
> System.Reflection.Module.IsResource is unimplemented.

Uhm, yes, the documentation is not clear on that point.
You can safely leave that bit unimplemented for now.

> I've attached patches and a simple test program. I'm bit suspicious of
> my mono_assemblyname_get_object & mono_module_get_object
> implementations. I'm not sure, how those are supposed to be implemented.

mono_module_get_object looks fine.
As for GetReferencedAssemblies() I'd make a different icall that returns
a Assembly[] and GetReferencedAssemblies() will create an AssemblyName
array and fill it from the Assembly array (using Assembly.GetName).
That way you don't need a mono_assemblyname_get_object().

Thanks!

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better