Exemple #1
0
        public System.Collections.Hashtable GetHash(String expression)
        {
            var result = this.Eval(expression);

            using (var inspector = new Inspecting.ObjectInspector(result)) {
                var hash = inspector.GetHash();

                return(hash);
            }
        }
Exemple #2
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);
            }
        }
Exemple #3
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);
        }