예제 #1
0
        /// <summary>
        ///     获得Double数据
        /// </summary>
        /// <returns></returns>
        public string GetString()
        {
            if (type != KeyValueType.String)
            {
                throw new Exception(string.Format("global {0} not string type", Key));
            }

            if (isInitString)
            {
                return(stringValue);
            }

            if (!KeyValueConfigManger.ContainsKey(Key))
            {
                Logs.Warn(string.Format("Global item {0} not default.", Key));
                stringValue = defaultStringValue;
            }
            else
            {
                stringValue = KeyValueConfigManger.GetValue(Key);
            }

            isInitString = true;

            return(stringValue);
        }