Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CheckCascade()

void System.Data.ForeignKeyConstraint.CheckCascade ( DataRow row,
DataRowAction action )
inlinepackage

Definition at line 515 of file ForeignKeyConstraint.cs.

516 {
517 if (row._inCascade)
518 {
519 return;
520 }
521 row._inCascade = true;
522 try
523 {
524 switch (action)
525 {
526 case DataRowAction.Change:
527 if (row.HasKeyChanged(_parentKey))
528 {
529 CascadeUpdate(row);
530 }
531 break;
532 case DataRowAction.Delete:
533 CascadeDelete(row);
534 break;
535 case DataRowAction.Commit:
536 CascadeCommit(row);
537 break;
538 case DataRowAction.Rollback:
539 CascadeRollback(row);
540 break;
541 default:
542 _ = 16;
543 break;
544 }
545 }
546 finally
547 {
548 row._inCascade = false;
549 }
550 }

References System.Data.DataRow._inCascade, System.Data.ForeignKeyConstraint._parentKey, System.action, System.Data.ForeignKeyConstraint.CascadeCommit(), System.Data.ForeignKeyConstraint.CascadeDelete(), System.Data.ForeignKeyConstraint.CascadeRollback(), System.Data.ForeignKeyConstraint.CascadeUpdate(), and System.Data.DataRow.HasKeyChanged().