[Ironpython-users] (Resend after group email address changed): Way to extend IronPython to application specific request without changing its source code?

zxpatric zxpatric at gmail.com
Thu Jun 16 18:31:45 CEST 2011


I am looking to extend IronPython in the way that a script like following
can run:

         Class1 c1 = Class1()
         print c1.Property

with Class1 defined in .NET module:

public class Class1
private int a;
public int A
    get { return a;}
    set { a=value;}

Property is not a .NET property of Class1 but there is an applicatin hard
"rule" for example that "Class1.Property" is equal to:

public int Property
get { return A+1;}

How may I append this rule (as a .NET module to IronPython or
Microsoft.Scripting.dll?) without touching the IronPython source so that
print c1.Property could be correctly inteperated by IronPython?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20110616/9b202dff/attachment.html>

More information about the Ironpython-users mailing list