Beispiel #1
0
        public void getDate(List <ConfigData> outData, string version, string ip)
        {
            string defaultKey         = "中国,,";
            string defaultVersino     = "error";
            string ipKey              = IP.FindQuit(ip);
            memoryPaySwitchModel muic = null;

            this.TryGet(version, out muic);
            if (muic == null)
            {
                this.TryGet(defaultVersino, out muic);
            }
            if (muic == null)
            {
                return;
            }

            string key = defaultKey;

            if (muic.keyVal.ContainsKey(ipKey))
            {
                key = ipKey;
            }
            outData.Add(muic.keyVal[key]);
        }
        ConfigData getRechargeData(string version, string ip)
        {
            string ipKey = IP.FindQuit(ip);

            ipKey = FormatOpenCloseKey(version, ipKey);
            //ConsoleLog.showNotifyInfo(ipKey + ":" + ip);

            if (false == _versionDataDic.ContainsKey(version))
            {
                version = "error";
            }
            Dictionary <string, ConfigData> ocd = _versionDataDic[version];

            if (false == ocd.ContainsKey(ipKey))
            {
                ipKey = _defaultOpenCloseKey;
            }

            return(ocd[ipKey]);
        }