Пример #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);
 }