////////////////////////////////////////////////////////////////////////////// private void CheckSourceInsertions() { //## METHODS OF source MUST NOT BE CALLED WHILE WE'RE ITERATING OVER source.insertList for (int i = 0; i < source.insertCount; i++) { int elt = source.insertList[i]; if (!target.Contains2(elt)) { throw InsertionForeignKeyViolationException(elt); } } }
public void WasDeleted(int arg2) { // arg2 is guaranteed to have been deleted and not reinserted if (source.Contains2(arg2)) { throw DeletionForeignKeyViolation(arg2); } }