/// <summary> /// Create a connection /// </summary> /// <param name="Properties">The Properties</param> public SSPClient(ClientProperties Properties) : this() { this.Properties = Properties; if (String.IsNullOrEmpty(Properties.Username)) { throw new ArgumentException("Username"); } if (String.IsNullOrEmpty(Properties.Password)) { throw new ArgumentException("Password"); } if (Properties.PublicKeyFile == null) { throw new ArgumentException("PublicKeyFile"); } if (Properties.PublicKeyFile.Length < 128) { throw new ArgumentException("PublicKeyFile must be >=128 in length"); } if (Properties.PrivateKeyFiles == null) { throw new ArgumentException("PrivateKeyFiles"); } if (Properties.PrivateKeyFiles.Length == 0) { throw new ArgumentException("There must be atleast 1 private key file"); } Connect(ConnectionState.Open); }
/// <summary> /// Create a connection /// </summary> /// <param name="Properties">The Properties</param> public SSPClient(ClientProperties Properties) : this() { this.Properties = Properties; if (String.IsNullOrEmpty(Properties.Username)) throw new ArgumentException("Username"); if (String.IsNullOrEmpty(Properties.Password)) throw new ArgumentException("Password"); if (Properties.PublicKeyFile == null) throw new ArgumentException("PublicKeyFile"); if (Properties.PublicKeyFile.Length < 128) throw new ArgumentException("PublicKeyFile must be >=128 in length"); if (Properties.PrivateKeyFiles == null) throw new ArgumentException("PrivateKeyFiles"); if (Properties.PrivateKeyFiles.Length == 0) throw new ArgumentException("There must be atleast 1 private key file"); Connect(ConnectionState.Open); }