public ProObject GetFlattend() { ProObject NewObject = new ProObject(); foreach (var Item in myProperties) { NewObject.Add(Item.Key, Item.Value); } ProObject CurrentPrototype = myPrototype; while (CurrentPrototype != null) { foreach (var Item in CurrentPrototype) { string CurrentKey = Item.Key; if (!NewObject.Contains(CurrentKey)) { NewObject.Add(CurrentKey, Item.Value); } } CurrentPrototype = CurrentPrototype.Prototype; } return(NewObject); }
public bool Contains(string BinderName) { if (!myProperties.ContainsKey(BinderName)) { if (myPrototype != null) { return(myPrototype.Contains(BinderName)); } } return(false); }