Example #1
0
        //////////////////////////////////////////////////////////////////////////////

        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.Contains1(elt))
                {
                    throw InsertionForeignKeyViolationException(elt);
                }
            }
        }
Example #2
0
 public void WasDeleted(int arg1)
 {
     // arg1 is guaranteed to have been deleted and not reinserted
     if (source.Contains1(arg1))
     {
         throw DeletionForeignKeyViolation(arg1);
     }
 }