[IronPython] Creating Dynamic Assemblies from IronPython 2.6
Dino Viehland
dinov at microsoft.com
Sat Mar 21 18:45:45 CET 2009
If you only have 1 method and don't need overload resolution I'd suggest making a delegate using System.Delegate.CreateDelegate. Otherwise this could be made public.
> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Jeff Hardy
> Sent: Saturday, March 21, 2009 9:44 AM
> To: Discussion of IronPython
> Subject: Re: [IronPython] Creating Dynamic Assemblies from IronPython
> 2.6
>
> Thanks Curt, that worked. Now I have a new problem - I can get a
> MethodInfo, but I need to be able to convert it to something I can
> call. Seo's old code used BuiltinFunction.MakeOrAdd, but that is now
> internal. Can this be made public, or is there a better way to handle
> it?
>
> - Jeff
>
> 2009/3/20 Curt Hagenlocher <curt at hagenlocher.org>:
> > I think this is something that broke well before the 2.0 release. To
> work
> > around it in pyc.py, we added DefineDynamicAssembly to the PythonOps
> class
> > in IronPython:
> >
> > import clr
> > clr.AddReference('IronPython')
> > from IronPython.Runtime.Operations import PythonOps
> > assemblyBuilder = PythonOps.DefineDynamicAssembly(...)
> >
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
More information about the Ironpython-users
mailing list