[IronPython] dynamic types
aviadr1 at gmail.com
Wed Aug 16 04:13:35 CEST 2006
I have a C# class with the following design
public interface IDynamicProperty
public class DynamicPropertiesContainer
IDynamicProperty GetDynamicProperty (string name)
and I have embedded IP as an internal scripting langauge.
what I would like is to expose the "DynamicProperties" of my class as
"actual" properties in IP, which is logical since IP is dynamic.
I want the following IP code to be equivalent (assuming that 'container' is
an object of type DynamicPropertiesContainer)
print container.GetDynamicProperty ("name")
-- or --
print container.GetDynamicProperty ("phone_number")
is there an easy way to achieve this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users