Exemplo n.º 1
0
 public void Add(XTJsonKeyable key, XTJsonData value)
 {
     if (key == null)
     {
         throw new XTJsonKeyNullException();
     }
     if (value == null)
     {
         this.m_datas.Add(key, XTJsonNone.Inst);
     }
     else
     {
         this.m_datas.Add(key, value);
     }
 }
Exemplo n.º 2
0
        // ----------------------------------------------------------
        // 模拟 Dictionary
        // ----------------------------------------------------------
        #region 属性

        public XTJsonData this[XTJsonKeyable key]
        {
            get
            {
                return(this.m_datas[key]);
            }
            set
            {
                if (key == null)
                {
                    throw new XTJsonKeyNullException();
                }
                if (value == null)
                {
                    this.m_datas.Add(key, XTJsonNone.Inst);
                }
                else
                {
                    this.m_datas.Add(key, value);
                }
            }
        }
Exemplo n.º 3
0
 public bool TryGetValue(XTJsonKeyable key, out XTJsonData value)
 {
     return(this.m_datas.TryGetValue(key, out value));
 }
Exemplo n.º 4
0
 public bool Remove(XTJsonKeyable key)
 {
     return(this.m_datas.Remove(key));
 }
Exemplo n.º 5
0
 public bool ContainsKey(XTJsonKeyable key)
 {
     return(this.m_datas.ContainsKey(key));
 }