public void Clear()
 {
     Inited = false;
     First  = null;
     dic.Clear();
     Items.Clear();
 }
        public void Init()
        {
            if (!Table.Inited)
            {
                throw new Exception("Tabele has not been initialised,it is intialised in GameController");
            }
            if (!Inited)
            {
                TableAdChannelPostfix preItem = null;
                string   tableStr             = TableTool.GetTxt(FileName);
                JSONNode data = JSONNode.Parse(tableStr);
                foreach (var itemData in data.Children)
                {
                    TableAdChannelPostfix item = new TableAdChannelPostfix();
                    item.Id      = itemData["Id"];
                    item.Postfix = itemData["Postfix"];


                    AddItem(item);
                    if (preItem != null)
                    {
                        preItem.Next = item;
                    }
                    preItem = item;
                }
                Inited = true;
            }
        }
 private static void AddItem(TableAdChannelPostfix item)
 {
     if (First == null)
     {
         First = item;
     }
     if (dic.ContainsKey(item.Id))
     {
         DebugUtil.LogError(FileName + " id duplicate :" + item.Id);
     }
     else
     {
         dic.Add(item.Id, item);
         Items.Add(item);
     }
 }
        public void Init(string tableStr)
        {
            TableAdChannelPostfix preItem = null;
            JSONNode data = JSONNode.Parse(tableStr);

            foreach (var itemData in data.Children)
            {
                TableAdChannelPostfix item = new TableAdChannelPostfix();
                item.Id      = itemData["Id"];
                item.Postfix = itemData["Postfix"];


                AddItem(item);
                if (preItem != null)
                {
                    preItem.Next = item;
                }
                preItem = item;
            }
        }