public void LoadGlobalStore() { foreach (var service in serviceQuery.GetAll().Where(s => !string.IsNullOrEmpty(s.Alias))) { GlobalStore.ServiceAliases.Set(service.Alias, service.Id); } }
public IActionResult Get() { var serviceElastics = serviceQuery.GetAll(); var services = serviceElastics.Select(s => { var service = s.ToServiceModel <Service>(); service.ActualProcessId = s.ProcessIdList.FirstOrDefault(pid => GlobalStore.Processes.IsExist(pid)); return(service); }); return(new OkObjectResult(services)); }