public HttpResponseMessage Delete() { try { _awsClient.Clear(); _traceSqsRecordsService.Add(_awsClient.QueueName, ActionType.Purge); } catch (Exception) { throw new HttpResponseException(HttpStatusCode.InternalServerError); } return Request.CreateResponse(HttpStatusCode.OK); }
public int GetCount() { var numberMessagesInQueue = 0; try { numberMessagesInQueue = _awsClient.Count(); _traceSqsRecordsService.Add(_awsClient.QueueName, ActionType.Count); } catch (Exception) { throw new HttpResponseException(HttpStatusCode.InternalServerError); } return(numberMessagesInQueue); }