public virtual bool Delete(ObjectReference @ref, int id, int cascade) { CheckSynchronization(); if (@ref != null) { if (!_container.FlagForDelete(@ref)) { return(false); } } if (DTrace.enabled) { DTrace.TransDelete.Log(id); } DeleteInfo info = (DeleteInfo)TreeInt.Find(_delete, id); if (info == null) { info = new DeleteInfo(id, @ref, cascade); _delete = Tree.Add(_delete, info); return(true); } info._reference = @ref; if (cascade > info._cascade) { info._cascade = cascade; } return(true); }
private void DeleteMembers(StatefulBuffer objectBytes) { ObjectHeader oh = new ObjectHeader(_clazz, objectBytes); DeleteInfo info = (DeleteInfo)TreeInt.Find(_transaction._delete, _id); if (info != null) { if (info._cascade > _cascade) { _cascade = info._cascade; } } objectBytes.SetCascadeDeletes(_cascade); DeleteContextImpl context = new DeleteContextImpl(objectBytes, oh, _clazz.ClassReflector (), null); _clazz.DeleteMembers(context, _typeInfo, true); }
public virtual Tree Find(int key) { return(TreeInt.Find(_tree, key)); }