Exemplo n.º 1
0
 public void LoadGlobalStore()
 {
     foreach (var service in serviceQuery.GetAll().Where(s => !string.IsNullOrEmpty(s.Alias)))
     {
         GlobalStore.ServiceAliases.Set(service.Alias, service.Id);
     }
 }
Exemplo n.º 2
0
        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));
        }