iControl.ConnectionInfo.setWebProxy C# (CSharp) 메소드

setWebProxy() 공개 메소드

public setWebProxy ( String host, int port, String proxyUser, String proxyPass ) : void
host String
port int
proxyUser String
proxyPass String
리턴 void
        public void setWebProxy(String host, int port, String proxyUser, String proxyPass)
        {
            System.Net.WebProxy proxy = new System.Net.WebProxy(host, port);
            if ((proxyUser.Length > 0) && (proxyPass.Length > 0))
            {
                proxy.Credentials = new System.Net.NetworkCredential();
                ((System.Net.NetworkCredential)proxy.Credentials).UserName = proxyUser;
                ((System.Net.NetworkCredential)proxy.Credentials).Password = proxyPass;
            }
            else
            {
                proxy.UseDefaultCredentials = true;
            }
            setWebProxy(proxy);
        }

Same methods

ConnectionInfo::setWebProxy ( System proxy ) : void