Example #1
0
        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);
        }