public IEnumerable <LogEntry> GetLogEntry(HttpRequestMessage request, string id) { using (_tracer.Step("DeploymentService.GetLogEntry")) { try { var deployments = _deploymentManager.GetLogEntries(id).ToList(); foreach (var entry in deployments) { if (entry.HasDetails) { entry.DetailsUrl = UriHelper.MakeRelative(request.RequestUri, entry.Id); } } return(deployments); } catch (FileNotFoundException ex) { var response = new HttpResponseMessage(HttpStatusCode.NotFound); response.Content = new StringContent(ex.Message); throw new HttpResponseException(response); } } }
public IEnumerable <LogEntry> GetLogEntry(string id) { using (_tracer.Step("DeploymentService.GetLogEntry")) { try { IEnumerable <LogEntry> deployments = _deploymentManager.GetLogEntries(id).ToList(); foreach (var entry in deployments) { if (entry.HasDetails) { entry.DetailsUrl = UriHelper.MakeRelative(Request.RequestUri, entry.Id); } } return(deployments); } catch (FileNotFoundException ex) { throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, ex)); } } }
public HttpResponseMessage GetLogEntry(string id) { using (_tracer.Step("DeploymentService.GetLogEntry")) { try { var deployments = _deploymentManager.GetLogEntries(id).ToList(); foreach (var entry in deployments) { if (entry.HasDetails) { entry.DetailsUrl = UriHelper.MakeRelative(Request.RequestUri, entry.Id); } } return(Request.CreateResponse(HttpStatusCode.OK, ArmUtils.AddEnvelopeOnArmRequest(deployments, Request))); } catch (FileNotFoundException ex) { throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.NotFound, ex)); } } }