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 ProObject New(params object[] ThePrameters) { ProObject Obj; if (myPrototype != null) { Obj = new ProObject(myPrototype); } else { Obj = new ProObject(); } myConstructorAction(Obj, ThePrameters); return(Obj); }
public ProObject New() { ProObject Obj; if (myPrototype != null) { Obj = new ProObject(myPrototype); } else { Obj = new ProObject(); } myConstructorAction(Obj, myEmptyArray); return(Obj); }
public bool TryGetObjectMember(string BinderName, out object result) { if (myProperties.ContainsKey(BinderName)) { result = myProperties[BinderName]; return(true); } else if (myPrototype != null) { ProObject CurrentPrototype = myPrototype; while (CurrentPrototype != null) { object TGMResult; if (CurrentPrototype.TryGetObjectMember(BinderName, out TGMResult)) { myProperties.Add(BinderName, TGMResult); result = TGMResult; return(true); } CurrentPrototype = CurrentPrototype.Prototype; } } if (IsPrototype(BinderName)) { if (myPrototype != null) { result = myPrototype; return(true); } } result = null; return(false); }
public bool TryGetProtoType(out ProObject TheProtoType) { TheProtoType = myPrototype; return(TheProtoType != null); }
public ProObject(ProObject ThePrototype) { myPrototype = ThePrototype; }