Exemple #1
0
 public void ReloadFiles()
 {
     using (new PerformanceTimer("Load files from memory"))
     {
         AllFiles = FilesFromMemory.GetAllFiles();
     }
 }
Exemple #2
0
        public FilesContainer(IMemory memory)
        {
            _memory         = memory;
            ItemClasses     = new ItemClasses();
            FilesFromMemory = new FilesFromMemory(_memory);

            using (new PerformanceTimer("Load files from memory"))
            {
                AllFiles = FilesFromMemory.GetAllFiles();
            }

            /*Task.Run(() =>
             * {
             *  using (new PerformanceTimer("Preload stats and mods"))
             *  {
             *      var test = Stats.records.Count;
             *      var test2 = Mods.records.Count;
             *      ParseFiles(AllFiles);
             *  }
             * });*/
        }
Exemple #3
0
        public FilesContainer(IMemory memory)
        {
            _memory         = memory;
            ItemClasses     = new ItemClasses();
            FilesFromMemory = new FilesFromMemory(_memory);

            using (new PerformanceTimer("Load files from memory"))
            {
                AllFiles = FilesFromMemory.GetAllFiles();

                Trace.WriteLine($"Loaded {AllFiles.Count} files from memory {AllFiles.Values.Count(x => x.Ptr > 0)}/{AllFiles.Count} has pointers.");
            }

            /*Task.Run(() =>
             * {
             *  using (new PerformanceTimer("Preload stats and mods"))
             *  {
             *      var test = Stats.records.Count;
             *      var test2 = Mods.records.Count;
             *      ParseFiles(AllFiles);
             *  }
             * });*/
        }