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"))); }
private bool IsProcGen(string text) { return(ProcGenFinder.IsProcGen(text)); }
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); } } }