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); }
public IHttpActionResult GetInfo(string handle) { var info = containerInfoService.GetInfoByHandle(handle); if (info == null) { return(NotFound()); } return(Json(info)); }
public Dictionary <string, BulkInfoResponse> BulkInfo(string[] handles) { var response = new Dictionary <string, BulkInfoResponse>(); foreach (var handle in handles) { var info = containerInfoService.GetInfoByHandle(handle); if (info != null) { response[handle] = new BulkInfoResponse { Info = info, }; } } return(response); }