nitro at dr-code.org
Tue Mar 29 12:34:10 CEST 2011
this question is not 100% targeted at IronPython, but I didn't know a
better list to write to.
instance them. The opposite way turns out to be much harder for non-PODs.
public class JSObject
// has members like GetProperty/SetProperty which can act upon the
public class TestClass
public string message = "This is a C# string";
public class TestApp
public string testComplexObject(TestClass obj)
public void runTest()
JSObject jsObj = ...;
string message = testComplexObject(jsObj);
The problem here is the "testComplexObject(jsObj)" call. Of course the
jsObj cannot be converted directly to a TestClass, because it's an
I am wondering how IronPython solves this problem. I've read the sources a
bit and it seems it makes use of IDynamicMetaObjectProvider etc. If
JSObject provided IDynamicMetaObjectProvider, would it allow "converting"
the jsObj to a TestClass obj? How?
It's not easy to find information on using the DLR for things like this on
the net, so I've asked here. Apologies if I am off-topic.
More information about the Ironpython-users