Ejemplo n.º 1
0
        public int Add(T entity)
        {
            entity.Id = EntityIdManager.GetNextId <T>(_storageFileInfo);

            XDocument.Load(_storageFileInfo.FullName)
            .AddToRoot(entity.ToXElement())
            .Save(_storageFileInfo.FullName);

            return(entity.Id);
        }
Ejemplo n.º 2
0
 public PerformanceTester(int frameCount, int systemCount, int entityCount, int componentPerEntity, bool clearConsoleBeforeFinal, bool beepOnEnd)
 {
     _beepOnEnd = beepOnEnd;
     _clearConsoleBeforeFinal = clearConsoleBeforeFinal;
     _componentPerEntity      = componentPerEntity;
     _entityCount             = entityCount;
     _systemCount             = systemCount;
     _frameCount       = frameCount;
     _systemsDatabase  = new SystemsDatabase();
     _entitiesDatabase = new EntitiesDatabase();
     _systemsRunner    = new SystemsRunner(_systemsDatabase, _entitiesDatabase);
     _entityIdManager  = new EntityIdManager();
 }