I should have been more specific here. I *am* interested in general DLR
information, but specifically there is a problem I am trying to solve, and I'm
wondering if anyone has some advice on this:
I'd like to write a C# wrapper function which dynamically calls a method of a
class. For a general method in the .Net library I would do something like this
(where obj is an "object"):
Type t = obj.GetType();
MethodInfo mi = t.GetMethod("Foo");
result = mi.Invoke(obj, parameters);
(Just hacked this together, might be errors there). What I'd like to do is
have a second code path so my function could also handle objects from the DLR
itself. Is there a way of doing this for objects based on the DLR (e.g.
IronPython 2.0)? How do you check if a general "object" is a DLR object?
My goal is to create a function which will call Foo on the given object given
no matter if the object is a C# object, an IronRuby object, IronPython object,
etc.
Thanks,
-Lee
________________________________________
From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Lee Culver [EMAIL
PROTECTED]
Sent: Saturday, September 22, 2007 10:35 AM
To: Discussion of IronPython
Subject: [IronPython] DLR Documentation?
I took some time to play with IronPython 2.0 this weekend, and I see that the
DLR is included with it. I’m interested playing with some of the interface and
looking to see how new languages might be implemented on the DLR. Obviously I
could dig through the source (and I have been), but I was wondering if there is
any documentation available on using the DLR? (I understand that it would be
subject to change at any time, being early in development and all.)
Thanks,
-Lee
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com