CloudProxySettings.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Net;
  5. namespace FastReport.Cloud
  6. {
  7. /// <summary>
  8. /// Represents proxy settings of the cloud storage.
  9. /// </summary>
  10. public class CloudProxySettings
  11. {
  12. #region Fields
  13. private ProxyType proxyType;
  14. private string server;
  15. private int port;
  16. private string username;
  17. private string password;
  18. #endregion // Fields
  19. #region Properties
  20. /// <summary>
  21. /// Gets or sets the type of proxy.
  22. /// </summary>
  23. public ProxyType ProxyType
  24. {
  25. get { return proxyType; }
  26. set { proxyType = value; }
  27. }
  28. /// <summary>
  29. /// Gets or sets the proxy server.
  30. /// </summary>
  31. public string Server
  32. {
  33. get { return server; }
  34. set { server = value; }
  35. }
  36. /// <summary>
  37. /// Gets or sets the port number of proxy server.
  38. /// </summary>
  39. public int Port
  40. {
  41. get { return port; }
  42. set { port = value; }
  43. }
  44. /// <summary>
  45. /// Gets or sets the username.
  46. /// </summary>
  47. public string Username
  48. {
  49. get { return username; }
  50. set { username = value; }
  51. }
  52. /// <summary>
  53. /// Gets or sets the user's password.
  54. /// </summary>
  55. public string Password
  56. {
  57. get { return password; }
  58. set { password = value; }
  59. }
  60. #endregion // Properties
  61. #region Constructors
  62. /// <summary>
  63. /// Initializes a new instance of the <see cref="CloudProxySettings"/> class.
  64. /// </summary>
  65. /// <param name="proxyType">The type of proxy.</param>
  66. /// <param name="server">The proxy server.</param>
  67. /// <param name="port">The port number of server.</param>
  68. /// <param name="username">The username.</param>
  69. /// <param name="password">The user's password.</param>
  70. public CloudProxySettings(ProxyType proxyType, string server, int port, string username, string password)
  71. {
  72. this.proxyType = proxyType;
  73. this.server = server;
  74. this.port = port;
  75. this.username = username;
  76. this.password = password;
  77. }
  78. #endregion // Constructors
  79. }
  80. /// <summary>
  81. /// Represents the type of rpoxy.
  82. /// </summary>
  83. public enum ProxyType
  84. {
  85. /// <summary>
  86. /// The HTTP proxy type.
  87. /// </summary>
  88. Http,
  89. /// <summary>
  90. /// The SOCKS4 proxy type.
  91. /// </summary>
  92. Socks4,
  93. /// <summary>
  94. /// The SOCKS5 proxy type.
  95. /// </summary>
  96. Socks5
  97. }
  98. }