Esempio n. 1
0
 private bool TrySetMember(string name, object value)
 {
     __names.Add(name);
     _arrayEntries     = new Dictionary <string, object>();
     _properties[name] = new DHash(value);
     return(true);
 }
Esempio n. 2
0
        public DHash AddDHash(string name)
        {
            var dhash = new DHash();

            __names.Add(name);
            _properties[name] = dhash;
            return(dhash);
        }
Esempio n. 3
0
 private static DHash FromJsonDictionary(DHash dhash, IDictionary <string, object> jsonDictionary)
 {
     foreach (var o in jsonDictionary)
     {
         if (o.Value is IDictionary <string, object> )
         {
             DHash nested = dhash.AddDHash(o.Key);
             FromJsonDictionary(nested, o.Value as IDictionary <string, object>);
         }
         else
         {
             dhash.TrySetMember(o.Key, o.Value);
         }
     }
     return(dhash);
 }
Esempio n. 4
0
        private static dynamic FromJsonDictionary(IDictionary <string, object> jsonDictionary)
        {
            var dhash = new DHash();

            return(FromJsonDictionary(dhash, jsonDictionary));
        }