Guest User

Untitled

a guest
Jan 23rd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. [HttpGet]
  2. [Route("GetDocumentFromFileStorage")]
  3. public async Task<HttpResponseMessage> GetDocumentFromFileStorage(string documentName)
  4. {
  5. try
  6. {
  7. return await new TaskFactory().StartNew(
  8. () =>
  9. {
  10. HttpResponseMessage response = _documentDownloadService.GetDocumentFromFileStorage(documentName.ToString());
  11. return response;
  12. });
  13. }
  14. catch (Exception ex)
  15. {
  16. Log4NetErrorLogger(ex);
  17.  
  18. return CreateHttpResponseMessage();
  19. }
  20. }
Add Comment
Please, Sign In to add comment