コード例 #1
0
        public void AddProxyManager(IProxyManager proxyManager)
        {
            if (proxyManager == null)
            {
                string msg = "BehaviorTreeManager.AddProxyManager() \n proxyManager is null.";
                LogError(msg);
                throw new Exception(msg);
            }

            EProxyType proxyType = proxyManager.GetProxyType();

            if (m_ProxyManagers.Count == 0)
            {
                m_ProxyManagers.Add(proxyManager);
            }
            else
            {
                //插入排序,EProxyType的枚举值越大,优先级越高
                for (int i = 0; i < m_ProxyManagers.Count; i++)
                {
                    IProxyManager tempProxyManager = m_ProxyManagers[i];
                    EProxyType    tempProxyType    = tempProxyManager.GetProxyType();
                    if (tempProxyType < proxyType)
                    {
                        m_ProxyManagers.Insert(i, proxyManager);
                        break;
                    }
                }
            }
        }
コード例 #2
0
 public ProxySettingsForBookmaker()
 {
     this._proxyType    = EProxyType.Http;
     this.ProxyAdress   = "";
     this._isProxyAuth  = false;
     this.ProxyLogin    = "";
     this.ProxyPassword = "";
     this.ProxyPort     = 8080;
 }
コード例 #3
0
        private ProxyForChrome ExtractMainProxyFromProxyConfig(ProxyConfig config)
        {
            EProxyType proxyType    = config.CurrentProxy.ProxyType;
            string     proxyAddress = config.CurrentProxy.ProxyAddress;
            int        proxyPort    = config.CurrentProxy.ProxyPort;

            if (!config.IsUsedProxyInProgram)
            {
                proxyType = EProxyType.Direct;
            }
            return(ProxyForChrome.ConvertToProxyChrome(proxyType, proxyAddress, proxyPort));
        }
コード例 #4
0
ファイル: Proxy.cs プロジェクト: shachaoshu/WsdlUI
 public Proxy()
 {
     Port      = 8888;
     Host      = "127.0.0.1";
     ProxyType = EProxyType.System;
 }