我有这种谜:
public class UIWindow : Control
{
public PythonDictionary Variables;
public PythonTuple Children
{
get
{
if(Variables.has_key("children"))
return (PythonTuple)Variables["children"];
return null;
}
}
public UIWindow(PythonDictionary variables)
{
Variables = variables;
LoadChildren(Children, this);
Tag = "window";
}
private void LoadChildren(PythonTuple children, Control parent)
{
--recursive loading
}
}
然后我希望课程获得有关自身的信息
public class UIText : Control
{
private PythonDictionary Myself
{
get
{
}
}
public string Name
{
get { MySelf["name"]; }
set { Myself["name"]; }
}
public UIText(Control parent)
{
Parent = parent;
Tag = "text";
}
}
我已经知道我的信息是pythontuple的类型,因为UIWindow的LoadChildren确实加载了pythontuples中的所有子项,但是我如何引用自己?
private PythonDictionary Myself
{
get
{
}
}