////////////////////////////////////////////////////////////////////////////// public void MightHaveBeenDeleted(int arg1, int arg2, int arg3) { if (source.Contains(arg1, arg2) && !target.Contains12(arg1, arg2)) { throw DeletionForeignKeyViolation(arg1, arg2, arg3); } }
////////////////////////////////////////////////////////////////////////////// private void CheckSourceInsertions() { int count = source.insertCount; int[] inserts = source.insertList; for (int i = 0; i < count; i++) { int offset = 3 * i; int arg1 = inserts[offset]; int arg2 = inserts[offset + 1]; if (!target.Contains(arg1, arg2)) { throw InsertionForeignKeyViolation(arg1, arg2, inserts[offset + 2]); } } }