コード例 #1
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")));
 }
コード例 #2
0
 private bool IsProcGen(string text)
 {
     return(ProcGenFinder.IsProcGen(text));
 }
コード例 #3
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);
         }
     }
 }