Esempio n. 1
0
 private static async Task CheckAndSave(CsvSystem system)
 {
     if (system.EDSystemAddress != null && !CatalogFinder.IsCatalogSystem(system.Name) && !ProcGenFinder.IsProcGen(system.Name))
     {
         var possiblySector = NamedSectorFinder.ExtractSectorName(system.Name);
         if (possiblySector == null)
         {
             await AddNamedSystems(new SystemMatch(system.Name, system.EDSystemAddress ?? 0));
         }
         else
         {
             await AddNamedSector(possiblySector);
         }
     }
 }
Esempio n. 2
0
 public IActionResult Get(string name)
 {
     if (ProcGenFinder.IsProcGen(name))
     {
         return(Ok(new ClassifyOutput("ProcGen")));
     }
     if (CatalogFinder.IsCatalogSystem(name))
     {
         return(Ok(new ClassifyOutput("Catalog")));
     }
     if (NamedSectorFinder.ExtractSectorName(name) != null)
     {
         return(Ok(new ClassifyOutput("ProcGenNamedSector")));
     }
     if (NamedSystemFinder.IsNamedSystem(name))
     {
         return(Ok(new ClassifyOutput("Named")));
     }
     return(Ok(new ClassifyOutput("Unknown")));
 }
Esempio n. 3
0
 private bool IsCatalogSystem(string text)
 {
     return(CatalogFinder.IsCatalogSystem(text));
 }