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); } } } }
protected virtual void SerializeEntityManager(bool bSaving) { if (bSaving) { SerializeListOwnerPrefixFixup(); } LinkedEntityManager <EntityType> Instance = new LinkedEntityManager <EntityType>(); XMLSerializable.SerializeFromXML <LinkedEntityManager <EntityType> >(GetEntityListFilename(), ref Instance, bSaving); }