DoFixup() public method

public DoFixup ( ObjectManager manager, bool strict ) : bool
manager ObjectManager
strict bool
return bool
Beispiel #1
0
        public bool DoFixups(bool asContainer, ObjectManager manager, bool strict)
        {
            BaseFixupRecord prevFixup = null;
            BaseFixupRecord fixup     = asContainer ? FixupChainAsContainer : FixupChainAsRequired;
            bool            allFixed  = true;

            while (fixup != null)
            {
                if (fixup.DoFixup(manager, strict))
                {
                    UnchainFixup(fixup, prevFixup, asContainer);
                    if (asContainer)
                    {
                        fixup.ObjectRequired.RemoveFixup(fixup, false);
                    }
                    else
                    {
                        fixup.ObjectToBeFixed.RemoveFixup(fixup, true);
                    }
                }
                else
                {
                    prevFixup = fixup;
                    allFixed  = false;
                }

                fixup = asContainer ? fixup.NextSameContainer : fixup.NextSameRequired;
            }
            return(allFixed);
        }
Beispiel #2
0
        public bool DoFixups(bool asContainer, ObjectManager manager, bool strict)
        {
            BaseFixupRecord prevFixup       = null;
            BaseFixupRecord baseFixupRecord = (!asContainer) ? this.FixupChainAsRequired : this.FixupChainAsContainer;
            bool            result          = true;

            while (baseFixupRecord != null)
            {
                if (baseFixupRecord.DoFixup(manager, strict))
                {
                    this.UnchainFixup(baseFixupRecord, prevFixup, asContainer);
                    if (asContainer)
                    {
                        baseFixupRecord.ObjectRequired.RemoveFixup(baseFixupRecord, false);
                    }
                    else
                    {
                        baseFixupRecord.ObjectToBeFixed.RemoveFixup(baseFixupRecord, true);
                    }
                }
                else
                {
                    prevFixup = baseFixupRecord;
                    result    = false;
                }
                baseFixupRecord = ((!asContainer) ? baseFixupRecord.NextSameRequired : baseFixupRecord.NextSameContainer);
            }
            return(result);
        }