public Dictionary<string, ContainerInfoEntry> BulkInfo(string[] handles)
 {
     var response = new Dictionary<string, ContainerInfoEntry>();
     foreach (var handle in handles)
     {
         ContainerInfoEntry infoEntry = new ContainerInfoEntry();
         try
         {
             var info = containerInfoService.GetInfoByHandle(handle);
             if (info == null)
             {
                 throw new Exception("container " + handle + " does not exist");
             }
             infoEntry.Info = info;
         }
         catch (Exception e)
         {
             infoEntry.Err = new Error()
             {
                 Message = "cannot get info for container " + handle + ". Error: " + e.Message,
             };
         }
         response[handle] = infoEntry;
     }
     return response;
 }
Пример #2
0
        public Dictionary <string, ContainerInfoEntry> BulkInfo(string[] handles)
        {
            var response = new Dictionary <string, ContainerInfoEntry>();

            foreach (var handle in handles)
            {
                ContainerInfoEntry infoEntry = new ContainerInfoEntry();
                try
                {
                    var info = containerInfoService.GetInfoByHandle(handle);
                    if (info == null)
                    {
                        throw new Exception("container " + handle + " does not exist");
                    }
                    infoEntry.Info = info;
                }
                catch (Exception e)
                {
                    infoEntry.Err = new Error()
                    {
                        Message = "cannot get info for container " + handle + ". Error: " + e.Message,
                    };
                }
                response[handle] = infoEntry;
            }
            return(response);
        }