Esempio n. 1
0
        public DictionaryItem NewChild(string key, object item)
        {
            //return new DictionaryItem(name, value, this);

            if (_value == null)
            {
                _value = new List <DictionaryItem>();
            }
            if (!(_value is List <DictionaryItem>))
            {
                return(null);
            }
            else
            {
                DictionaryItem        di  = new DictionaryItem(name, value, this);
                List <DictionaryItem> ldi = _value as List <DictionaryItem>;
                ldi.Add(di);
                di.level = this.level + 1;
                return(di);
            }

            DictionaryItem di = new DictionaryItem(key, item, this);
        }
Esempio n. 2
0
 protected DictionaryItem(string key, DictionaryItem father)
 {
     this.key    = key;
     items       = new List <object>();
     this.father = father;
 }