Ejemplo n.º 1
0
        public List <object> GetList(String expression)
        {
            var result = this.Eval(expression);

            using (var inspector = new Inspecting.ObjectInspector(result)) {
                var list = inspector.GetList();

                return(list);
            }
        }
Ejemplo n.º 2
0
        public Hashtable GetHash()
        {
            Hashtable     result = new Hashtable();
            List <String> names  = GetNames();

            foreach (var name in names)
            {
                var value = GetValue <object>(name);

                if (value.GetType().GUID.Equals(Guid.Empty))
                {
                    using (var inspector = new ObjectInspector(value)) {
                        var    valueNames = inspector.GetNames();
                        object newValue   = null;

                        if (valueNames.Count > 0)
                        {
                            if (valueNames[0] == "0")
                            {
                                newValue = inspector.GetList();
                            }
                            else
                            {
                                newValue = inspector.GetHash();
                            }
                            result.Add(name, newValue);
                        }
                    }
                }
                else
                {
                    result.Add(name, value);
                }
            }

            return(result);
        }