Beispiel #1
0
 private bool InternalInitialize()
 {
     try
     {
         _symbols = StandardLibrary.GetSymbolTable();
         var files     = EntryImporter.GetPossibleAssociatedFiles(Pcc);
         var gameFiles = MELoadedFiles.GetFilesLoadedInGame(Pcc.Game);
         foreach (var fileName in Enumerable.Reverse(files))
         {
             if (gameFiles.TryGetValue(fileName, out string path) && File.Exists(path))
             {
                 using var pcc = MEPackageHandler.OpenMEPackage(path);
                 if (!StandardLibrary.ResolveAllClassesInPackage(pcc, ref _symbols))
                 {
                     return(false);
                 }
             }
         }
         return(StandardLibrary.ResolveAllClassesInPackage(Pcc, ref _symbols));
     }
     catch (Exception e)
     {
         return(false);
     }
 }