void CreateLocator(EGID egid)
        {
            // Check if we need to create a new EntityLocator or whether we can recycle an existing one.s
            EntityLocator locator;

            if (_nextEntityId == _entityLocatorMap.count)
            {
                _entityLocatorMap.Add(new EntityLocatorMapElement(egid));
                locator = new EntityLocator(_nextEntityId++);
            }
            else
            {
                ref var element = ref _entityLocatorMap[_nextEntityId];
                locator = new EntityLocator(_nextEntityId, element.version);
                // The recycle entities form a linked list, using the egid.entityID to store the next element.
                _nextEntityId = element.egid.entityID;
                element.egid  = egid;
            }
 public bool FindEGID(EntityLocator entityLocator, out EGID egid)
 {
     return(_enginesRoot.TryGetEGID(entityLocator, out egid));
 }
 public bool TryGetEGID(EntityLocator locator, out EGID egid)
 {
     return(_enginesRoot.Target.TryGetEGID(locator, out egid));
 }