예제 #1
0
        public void DeleteObject(BaseNonPersistent obj)
        {
            var found = FindObject(obj.ID);

            if (found != null)
            {
                objects.Remove(found);
            }
        }
예제 #2
0
        public void SaveObject(BaseNonPersistent obj)
        {
            var found = FindObject(obj.ID);

            if (found != null)
            {
                objects.Remove(found);
            }
            objects.Add(obj.Clone(this));
            obj.NPOnSaving(obj.ObjectSpace);
        }
예제 #3
0
 public void Add(BaseNonPersistent obj)
 {
     objects.Add(obj);
 }
예제 #4
0
 public virtual void CopyTo(BaseNonPersistent target, IObjectMap map)
 {
     throw new Exception("CopyTo needs to be overriden");
 }
예제 #5
0
 private BaseNonPersistent GetObject(BaseNonPersistent obj)
 {
     return(!objectSpace.IsNewObject(obj) ? GetObjectByKey(obj.ID) : obj);
 }