private void UnchainFixup(BaseFixupRecord fixup, BaseFixupRecord prevFixup, bool asContainer) { if (prevFixup == null) { if (asContainer) { FixupChainAsContainer = fixup.NextSameContainer; } else { FixupChainAsRequired = fixup.NextSameRequired; } } else { if (asContainer) { prevFixup.NextSameContainer = fixup.NextSameContainer; } else { prevFixup.NextSameRequired = fixup.NextSameRequired; } } }
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); }
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); }
public void ChainFixup(BaseFixupRecord fixup, bool asContainer) { if (asContainer) { fixup.NextSameContainer = FixupChainAsContainer; FixupChainAsContainer = fixup; } else { fixup.NextSameRequired = FixupChainAsRequired; FixupChainAsRequired = fixup; } }
public void RemoveFixup(BaseFixupRecord fixupToRemove, bool asContainer) { BaseFixupRecord prevFixup = null; for (BaseFixupRecord baseFixupRecord = (!asContainer) ? this.FixupChainAsRequired : this.FixupChainAsContainer; baseFixupRecord != null; baseFixupRecord = ((!asContainer) ? baseFixupRecord.NextSameRequired : baseFixupRecord.NextSameContainer)) { if (baseFixupRecord == fixupToRemove) { this.UnchainFixup(baseFixupRecord, prevFixup, asContainer); return; } prevFixup = baseFixupRecord; } }
public void RemoveFixup(BaseFixupRecord fixupToRemove, bool asContainer) { BaseFixupRecord prevFixup = null; BaseFixupRecord fixup = asContainer ? FixupChainAsContainer : FixupChainAsRequired; while (fixup != null) { if (fixup == fixupToRemove) { UnchainFixup(fixup, prevFixup, asContainer); return; } prevFixup = fixup; fixup = asContainer ? fixup.NextSameContainer : fixup.NextSameRequired; } }
public void ChainFixup (BaseFixupRecord fixup, bool asContainer) { if (asContainer) { fixup.NextSameContainer = FixupChainAsContainer; FixupChainAsContainer = fixup; } else { fixup.NextSameRequired = FixupChainAsRequired; FixupChainAsRequired = fixup; } }
private void UnchainFixup (BaseFixupRecord fixup, BaseFixupRecord prevFixup, bool asContainer) { if (prevFixup == null) { if (asContainer) FixupChainAsContainer = fixup.NextSameContainer; else FixupChainAsRequired = fixup.NextSameRequired; } else { if (asContainer) prevFixup.NextSameContainer = fixup.NextSameContainer; else prevFixup.NextSameRequired = fixup.NextSameRequired; } }
public void RemoveFixup (BaseFixupRecord fixupToRemove, bool asContainer) { BaseFixupRecord prevFixup = null; BaseFixupRecord fixup = asContainer ? FixupChainAsContainer : FixupChainAsRequired; while (fixup != null) { if (fixup == fixupToRemove) { UnchainFixup (fixup, prevFixup, asContainer); return; } prevFixup = fixup; fixup = asContainer ? fixup.NextSameContainer : fixup.NextSameRequired; } }
private void AddFixup (BaseFixupRecord record) { record.ObjectToBeFixed.ChainFixup (record, true); record.ObjectRequired.ChainFixup (record, false); }
private void AddFixup(BaseFixupRecord record) { record.ObjectToBeFixed.ChainFixup(record, true); record.ObjectRequired.ChainFixup(record, false); }