private void DeleteEntity(EntityId entityId, DeleteBehaviours deleteBehaviour) { if (!_markedForDeletion.ContainsKey(entityId)) { _markedForDeletion.Add(entityId, deleteBehaviour); if (!(entityId is BlankId)) { _entitiesRemoved.Add(entityId); } if ((deleteBehaviour & DeleteBehaviours.DeleteVolatileChildren) == DeleteBehaviours.DeleteVolatileChildren) { foreach (EntityQuad quad in _currentQuads[entityId]) { if ((quad.Predicate.Uri.AbsoluteUri != Rdf.type.AbsoluteUri) && ((((deleteBehaviour & DeleteBehaviours.DeleteVolatileChildren) == DeleteBehaviours.DeleteVolatileChildren) && (quad.Object.IsBlank)) || (((deleteBehaviour & DeleteBehaviours.DeleteChildren) == DeleteBehaviours.DeleteChildren) && (!quad.Object.IsLiteral)))) { DeleteEntity(quad.Object.ToEntityId(), deleteBehaviour); } } } } }
public void Delete(EntityId entityId, DeleteBehaviours deleteBehaviour = DeleteBehaviours.DeleteVolatileChildren | DeleteBehaviours.NullifyVolatileChildren) { _markedForDeletion = null; _deletedEntities[entityId] = deleteBehaviour; }