1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-19 04:13:02 +00:00

proxy authentication added

This commit is contained in:
Illia Bielkin
2019-02-02 21:55:57 +02:00
parent a56de43ca3
commit 5fad5a4d8e
4 changed files with 31 additions and 3 deletions
+27
View File
@@ -13,6 +13,16 @@ namespace CryptoExchange.Net.Objects
/// </summary>
public int Port { get; }
/// <summary>
/// The login of the proxy
/// </summary>
public string Login { get; }
/// <summary>
/// The password of the proxy
/// </summary>
public string Password { get; }
/// <summary>
/// Create new settings for a proxy
/// </summary>
@@ -26,5 +36,22 @@ namespace CryptoExchange.Net.Objects
Host = host;
Port = port;
}
/// <inheritdoc />
/// <summary>
/// Create new settings for a proxy
/// </summary>
/// <param name="host">The proxy hostname/ip</param>
/// <param name="port">The proxy port</param>
/// <param name="login">The proxy login</param>
/// <param name="password">The proxy password</param>
public ApiProxy(string host, int port, string login, string password) : this(host, port)
{
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password))
throw new ArgumentException("Proxy login or password not filled");
Login = login;
Password = Password;
}
}
}