/// <summary> /// Initializes a new instance of the <see cref="PasswordConnectionInfo"/> class. /// </summary> /// <param name="host">Connection host.</param> /// <param name="port">Connection port.</param> /// <param name="username">Connection username.</param> /// <param name="password">Connection password.</param> /// <exception cref="ArgumentNullException"><paramref name="password"/> is null.</exception> /// <exception cref="ArgumentException"><paramref name="host"/> is invalid, or <paramref name="username"/> is null or contains whitespace characters.</exception> /// <exception cref="ArgumentOutOfRangeException"><paramref name="port"/> is not within <see cref="f:IPEndPoint.MinPort"/> and <see cref="f:IPEndPoint.MaxPort"/>.</exception> public PasswordConnectionInfo(string host, int port, string username, string password) : base(host, port, username) { if (password == null) throw new ArgumentNullException("password"); this._password = password; this._requestMessage = new RequestMessagePassword(ServiceName.Connection, this.Username, password); }
/// <summary> /// Initializes a new instance of the <see cref="PasswordAuthenticationMethod"/> class. /// </summary> /// <param name="username">The username.</param> /// <param name="password">The password.</param> /// <exception cref="ArgumentException"><paramref name="username"/> is whitespace or null.</exception> /// <exception cref="ArgumentException"><paramref name="password"/> is null.</exception> public PasswordAuthenticationMethod(string username, byte[] password) : base(username) { if (password == null) throw new ArgumentNullException("password"); _password = password; _requestMessage = new RequestMessagePassword(ServiceName.Connection, Username, _password); }
public void MethodNameTest() { ServiceName serviceName = new ServiceName(); // TODO: Initialize to an appropriate value string username = string.Empty; // TODO: Initialize to an appropriate value RequestMessage target = new RequestMessage(serviceName, username); // TODO: Initialize to an appropriate value string actual; actual = target.MethodName; Assert.Inconclusive("Verify the correctness of this test method."); }
/// <summary> /// Initializes a new instance of the <see cref="PasswordAuthenticationMethod"/> class. /// </summary> /// <param name="username">The username.</param> /// <param name="password">The password.</param> /// <exception cref="ArgumentException"><paramref name="username"/> is whitespace or null.</exception> /// <exception cref="ArgumentException"><paramref name="password"/> is null.</exception> public PasswordAuthenticationMethod(Lazy<string> username, Lazy<string> password) : base(username) { if (password == null) throw new ArgumentNullException("password"); this._password = password; this._requestMessage = new RequestMessagePassword(ServiceName.Connection, this.Username, password); }
/// <summary> /// Initializes a new instance of the <see cref="KeyboardInteractiveConnectionInfo"/> class. /// </summary> /// <param name="host">Connection host.</param> /// <param name="port">Connection port.</param> /// <param name="username">Connection username.</param> /// <param name="proxyType">Type of the proxy.</param> /// <param name="proxyHost">The proxy host.</param> /// <param name="proxyPort">The proxy port.</param> /// <param name="proxyUsername">The proxy username.</param> /// <param name="proxyPassword">The proxy password.</param> public KeyboardInteractiveConnectionInfo(string host, int port, string username, ProxyTypes proxyType, string proxyHost, int proxyPort, string proxyUsername, string proxyPassword) : base(host, port, username, proxyType, proxyHost, proxyPort, proxyUsername, proxyPassword) { this._requestMessage = new RequestMessageKeyboardInteractive(ServiceName.Connection, username); }
/// <summary> /// Initializes a new instance of the <see cref="KeyboardInteractiveAuthenticationMethod"/> class. /// </summary> /// <param name="username">The username.</param> /// <exception cref="ArgumentException"><paramref name="username"/> is whitespace or null.</exception> public KeyboardInteractiveAuthenticationMethod(string username) : base(username) { this._requestMessage = new RequestMessageKeyboardInteractive(ServiceName.Connection, username); }
/// <summary> /// Initializes a new instance of the <see cref="KeyboardInteractiveConnectionInfo"/> class. /// </summary> /// <param name="host">Connection host.</param> /// <param name="port">Connection port.</param> /// <param name="username">Connection username.</param> public KeyboardInteractiveConnectionInfo(string host, int port, string username) : base(host, port, username) { this._requestMessage = new RequestMessageKeyboardInteractive(ServiceName.Connection, username); }
public void RequestMessageConstructorTest() { ServiceName serviceName = new ServiceName(); // TODO: Initialize to an appropriate value string username = string.Empty; // TODO: Initialize to an appropriate value RequestMessage target = new RequestMessage(serviceName, username); Assert.Inconclusive("TODO: Implement code to verify target"); }