mirror of
https://github.com/JKorf/CryptoExchange.Net
synced 2025-06-08 08:26:20 +00:00
65 lines
1.9 KiB
C#
65 lines
1.9 KiB
C#
using System.Security;
|
|
|
|
namespace CryptoExchange.Net.Objects
|
|
{
|
|
/// <summary>
|
|
/// Proxy info
|
|
/// </summary>
|
|
public class ApiProxy
|
|
{
|
|
/// <summary>
|
|
/// The host address of the proxy
|
|
/// </summary>
|
|
public string Host { get; }
|
|
/// <summary>
|
|
/// The port of the proxy
|
|
/// </summary>
|
|
public int Port { get; }
|
|
|
|
/// <summary>
|
|
/// The login of the proxy
|
|
/// </summary>
|
|
public string? Login { get; }
|
|
|
|
/// <summary>
|
|
/// The password of the proxy
|
|
/// </summary>
|
|
public SecureString? Password { get; }
|
|
|
|
/// <summary>
|
|
/// Create new settings for a proxy
|
|
/// </summary>
|
|
/// <param name="host">The proxy hostname/ip</param>
|
|
/// <param name="port">The proxy port</param>
|
|
public ApiProxy(string host, int port): this(host, port, null, (SecureString?)null)
|
|
{
|
|
}
|
|
|
|
/// <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, login, password?.ToSecureString())
|
|
{
|
|
}
|
|
|
|
/// <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, SecureString? password)
|
|
{
|
|
Host = host;
|
|
Port = port;
|
|
Login = login;
|
|
Password = password;
|
|
}
|
|
}
|
|
}
|