Hi,
 
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.
 
example:
I want the following IP code to be equivalent (assuming that 'container' is an object of type DynamicPropertiesContainer)
 
print container.GetDynamicProperty ("name")
print container.name
 
   -- or --
 
print container.GetDynamicProperty ("phone_number")
print container.phone_number
 
is there an easy way to achieve this?
 
thanks
A.
 
 
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to