Esempio n. 1
0
        /*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);
        }