/Atlassian.Jira/WebClientWrapper.cs

https://bitbucket.org/seansparkman/atlassian.net-sdk · C# · 28 lines · 24 code · 4 blank · 0 comment · 0 complexity · c8d1a86258c43e6275e8360babed3ca1 MD5 · raw file

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Net;
  6. namespace Atlassian.Jira
  7. {
  8. internal class WebClientWrapper: IWebClient
  9. {
  10. private readonly WebClient _webClient;
  11. public WebClientWrapper()
  12. {
  13. _webClient = new WebClient();
  14. }
  15. public void AddQueryString(string key, string value)
  16. {
  17. _webClient.QueryString.Add(key, value);
  18. }
  19. public void Download(string url, string fileName)
  20. {
  21. _webClient.DownloadFile(url, fileName);
  22. }
  23. }
  24. }