public static ConnectionCredentials GetConnectionCredentials(string serverUrl, string username, SecureString password) { var credentials = new ConnectionCredentials { ServerUrl = new Uri(serverUrl), PortSpecifiedByUser = ConnectionValidator.Port80Specified(serverUrl), ProxyRequired = false, Username = username, Password = password, }; return(credentials); }
/*public string ProxyUrl { get; private set; } * public int ProxyPort { get; private set; } * public bool ProxyAuthRequired { get; private set; } * public string ProxyUserName { get; private set; } * public SecureString ProxyPassword { get; private set; } */ public static ConnectionCredentials GetConnectionCredentials(ConnectionParams connectionParams) { var credentials = new ConnectionCredentials { Password = connectionParams.Password, ServerUrl = connectionParams.Url(), PortSpecifiedByUser = ConnectionValidator.Port80Specified(connectionParams.Server), Username = connectionParams.UserName, /*ProxyAuthRequired = connectionParams.Proxy.IsAuthRequired, * ProxyPassword = connectionParams.Proxy.Password, * ProxyPort = connectionParams.Proxy.Port, * ProxyRequired = connectionParams.Proxy.IsRequired, * ProxyUrl = connectionParams.Proxy.Url, * ProxyUserName = connectionParams.Proxy.UserName*/ }; return(credentials); }