[IronPython] Subclassing then instantiating from C#

hellosticky hellosticky at gmail.com
Tue Aug 26 21:01:04 CEST 2008


Would the emitted CLS type subclass my class?
I think I will go toward the DLR hosting model instead...
Thanks,


  _____  

From: Curt Hagenlocher [mailto:curt at hagenlocher.org] 
Sent: Tuesday, August 26, 2008 2:48 PM
To: hellosticky at gmail.com; Discussion of IronPython
Subject: Re: [IronPython] Subclassing then instantiating from C#


This isn't really a supported scenario today.  There is a CLS type emitted for your class but it's emitted at runtime.  See also http://blogs.msdn.com/shrib/archive/2008/07/24/cls-compilation-of-ironpython.aspx
 
Before joining the IronPython team, I started a project that would allow this operation -- but I haven't been able to put any time into it recently.
 
On Tue, Aug 26, 2008 at 11:44 AM, hellosticky <hellosticky at gmail.com> wrote:


Hi, I have a C#.NET DLL that has an abstract class. I subclass this class in IronPython, and then build a DLL using pyc.py. Now, I'd like to load this IronPython Assembly from another C# project, instantiate the class (using something like Assembly.GetType()) and call the virtual method on it.

The override of the abstract method worked and the DLL got build, but when I load it in Reflector, I don't see any classes that subclass the original .NET class. Any ideas?

Thanks,

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080826/30cd585f/attachment.html>


More information about the Ironpython-users mailing list