Beispiel #1
0
        /// <summary>
        /// 获取下一个键值
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public int GetNextValue(string key)
        {
            KeyValueInfo keyValueInfo;

            if (KeyValueInfos.ContainsKey(key))
            {
                keyValueInfo = KeyValueInfos[key];
            }
            else
            {
                keyValueInfo = new KeyValueInfo(key, PoolSize);
                KeyValueInfos.Add(key, keyValueInfo);
            }
            return(keyValueInfo.NextKey);
        }
        /// <summary>
        /// 获取下一个键值
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public int GetNextValue(string key)
        {
            KeyValueInfo keyValueInfo;

            if (KeyValueInfos.ContainsKey(key))
            {
                keyValueInfo = KeyValueInfos[key];
            }
            else
            {
                keyValueInfo = new KeyValueInfo(key, PoolSize);
                KeyValueInfos.Add(key, keyValueInfo);
            }
            return keyValueInfo.NextKey;
        }