Example #1
0
        public JDom Add()
        {
            JDom temp = new JDom();

            Add(temp);

            return(temp);
        }
Example #2
0
File: JItem.cs Project: noear/Weed3
        public JItem this[string name]
        {
            get
            {
                if (_Dom == null)
                    _Dom = new JDom();

                return _Dom[name];
            }
        }
Example #3
0
        public JItem this[string name]
        {
            get
            {
                if (_Dom == null)
                {
                    _Dom = new JDom();
                }

                return(_Dom[name]);
            }
        }
Example #4
0
        public static JDom ToJson(object val, Type type)
        {
            JDom dom = new JDom();

            foreach (PropertyInfo p in type.GetProperties())
            {
                if (p.CanRead && p.Name != "Item")
                {
                    dom[p.Name].Val(p.GetValue(val, null));
                }
            }

            return(dom);
        }
Example #5
0
        public JItem Add(JDom obj)
        {
            if (_DomList == null)
            {
                _DomList = new List <JDom>();
            }

            _DomList.Add(obj);
            _Dom = obj;

            AsArray();

            return(this);
        }
Example #6
0
        public static JDom ToJson(object val, Type type)
        {
            JDom dom = new JDom();

            foreach (PropertyInfo p in type.GetProperties())
            {
                if (p.CanRead && p.Name != "Item")
                    dom[p.Name].Val(p.GetValue(val, null));
            }

            return dom;
        }
Example #7
0
 public void Val(JDom obj)
 {
     _Dom = obj;
 }
Example #8
0
File: JItem.cs Project: noear/Weed3
 public void Val(JDom obj)
 {
     _Dom = obj;
 }
Example #9
0
File: JItem.cs Project: noear/Weed3
        public void Val(IEnumerable valList)
        {
            JItem temp = JConvert.ToJson(valList);

            if (temp._DomList != null)
            {
                _DomList = temp._DomList;
                _Dom = _DomList[_DomList.Count - 1];
            }
            else if (temp._ValList != null)
                _ValList = temp._ValList;
        }
Example #10
0
File: JItem.cs Project: noear/Weed3
        public JDom Add()
        {
            JDom temp = new JDom();
            Add(temp);

            return temp;
        }
Example #11
0
File: JItem.cs Project: noear/Weed3
        public JItem Add(JDom obj)
        {
            if (_DomList == null)
                _DomList = new List<JDom>();

            _DomList.Add(obj);
            _Dom = obj;

            AsArray();

            return this;
        }