public virtual void FixupLinksWithList(GetLinkedEntityForFilename GetEntityFunction, GetLinkedEntityManager GetManagerFunction, ref List <string> LookupList, LinkType NameType) { foreach (string CurrentLinkName in LookupList) { string LinkFilename = CurrentLinkName.Substring(0, CurrentLinkName.IndexOf(":-:")); string LinkName = CurrentLinkName.Substring(CurrentLinkName.IndexOf(":-:") + 3); if (NameType == XMLSerializable.LinkType.LINK_NormalLink) { EntityType Linked = GetEntityFunction(LinkFilename); if (Linked != null) { EntityLink <EntityType> DestinationLink = ((EntityType)Linked).GetLinkByName(LinkName); if (DestinationLink != null) { EstablishLink(DestinationLink); } } } else { LinkedEntityManager <EntityType> EntityManager = GetManagerFunction(); if (EntityManager != null) { EntityManager.FixupStartEndLink(this, LinkFilename, LinkName, NameType); } } } }
public virtual void FixupLinks(GetLinkedEntityForFilename GetEntityFunction, GetLinkedEntityManager GetManagerFunction) { FixupLinksWithList(GetEntityFunction, GetManagerFunction, ref LinkNamesToResolve, XMLSerializable.LinkType.LINK_NormalLink); FixupLinksWithList(GetEntityFunction, GetManagerFunction, ref StartLinkNamesToResolve, XMLSerializable.LinkType.LINK_StartLink); FixupLinksWithList(GetEntityFunction, GetManagerFunction, ref EndLinkNamesToResolve, XMLSerializable.LinkType.LINK_EndLink); }