protected SecureConnectionFactory(SecureConnectionSettings settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } Ssl.Enabled = true; Ssl.ServerName = settings.ServerName; Ssl.CertPath = settings.CertPath; Ssl.CertPassphrase = settings.CertPassphrase; Ssl.Version = settings.Protocol; Port = settings.Port; }
public ExternalAuthConnectionFactory( string hostname, ExternalMechanismFactory externalMechanismFactory, SecureConnectionSettings settings) : base(settings) { HostName = string.IsNullOrWhiteSpace(hostname) ? throw new ArgumentException(nameof(hostname)) : hostname; AuthMechanisms = externalMechanismFactory == null ? throw new ArgumentNullException(nameof(externalMechanismFactory)) : new List <AuthMechanismFactory> { externalMechanismFactory }; }
public BasicConnectionFactory(string hostname, string username, string password, SecureConnectionSettings settings) : base(settings) { HostName = string.IsNullOrWhiteSpace(hostname) ? throw new ArgumentException(nameof(hostname)) : hostname; UserName = string.IsNullOrWhiteSpace(username) ? throw new ArgumentException(nameof(username)) : username; Password = string.IsNullOrWhiteSpace(password) ? throw new ArgumentException(nameof(password)) : password; }