OnCorruptionRemoved() public static method

public static OnCorruptionRemoved ( Entity corruptEntity ) : void
corruptEntity Entity
return void
Esempio n. 1
0
        protected internal override void PreSaving(PreSavingContext ctx)
        {
            base.PreSaving(ctx);

            if (Corrupt)
            {
                var integrity = MainEntity.EntityIntegrityCheckBase(); // So, no corruption allowed
                if (integrity == null)
                {
                    this.Corrupt = false;
                    if (!MainEntity.IsNew)
                    {
                        Corruption.OnCorruptionRemoved(MainEntity);
                    }
                }
                else if (MainEntity.IsNew)
                {
                    Corruption.OnSaveCorrupted(MainEntity, integrity);
                }
            }
        }
        protected internal override void PreSaving(ref bool graphModified)
        {
            base.PreSaving(ref graphModified);

            if (Corrupt)
            {
                var integrity = MainEntity.IdentifiableIntegrityCheckBase(); // So, no corruption allowed
                if (integrity == null)
                {
                    this.Corrupt = false;
                    if (!MainEntity.IsNew)
                    {
                        Corruption.OnCorruptionRemoved(MainEntity);
                    }
                }
                else if (MainEntity.IsNew)
                {
                    Corruption.OnSaveCorrupted(MainEntity, integrity);
                }
            }
        }