Example #1
0
    /// <summary>
    /// ╦Ы╬щеДжц╠ЮбК╩Ях║еДжцпео╒
    /// </summary>
    /// <param name="type"></param>
    /// <returns></returns>
    public GameServerConfigEntity Get(ConfigCode code)
    {
        GameServerConfigEntity entity = null;

        if (m_List == null || m_List.Count == 0)
        {
            entity = new GameServerConfigEntity()
            {
                ConfigCode = code.ToString()
            };
            m_List.Add(entity);
        }

        for (int i = 0; i < m_List.Count; i++)
        {
            if (m_List[i].ConfigCode.Equals(code.ToString(), System.StringComparison.CurrentCultureIgnoreCase))
            {
                entity = m_List[i];
                break;
            }
        }

        if (entity == null)
        {
            entity = new GameServerConfigEntity()
            {
                ConfigCode = code.ToString()
            };
            m_List.Add(entity);
        }

        return(entity);
    }
Example #2
0
 public AConfigItem(ConfigCode code, string text)
 {
     this.Code = code;
     this.Name = code.ToString();
     this.Text = text;
 }
Example #3
0
 public AConfigItem(ConfigCode code, string text)
 {
     Code = code;
     Name = code.ToString();
     Text = text;
 }