Example #1
0
    public string GetString(string key)
    {
        try
        {
            if (this.ContainsKey(key))
            {
                //String 读取null 的改进,兼容旧代码
#if Compatibility
                return(this[key]);
#else
                return(ParseTool.GetString(this[key]));
#endif
            }

            if (data.m_defaultValue.ContainsKey(key))
            {
#if Compatibility
                return(data.m_defaultValue[key]);
#else
                return(ParseTool.GetString(data.m_defaultValue[key]));
#endif
            }
        }
        catch (Exception e)
        {
            throw new Exception("SingleData GetString Error TableName is :->" + data.m_tableName + "<- key->" + key + "<-  singleDataName : ->" + m_SingleDataKey + "<- \n" + e.ToString());
        }

        throw new Exception("Don't Exist Value or DefaultValue by ->" + key + "<- TableName is : ->" + data.m_tableName + "<- singleDataName : ->" + m_SingleDataKey + "<-");// throw
    }