示例#1
0
        static ListAttr convertFromMsgPackObjectList(IList <MsgPack.MessagePackObject> mpobj)
        {
            ListAttr list = new ListAttr();
            IEnumerator <MsgPack.MessagePackObject> e = mpobj.GetEnumerator();

            while (e.MoveNext())
            {
                list.append(convertFromMsgPackObject(e.Current));
            }
            return(list);
        }
示例#2
0
        internal void OnListAttrAppend(ListAttr path, object val)
        {
            ListAttr l = getAttrByPath(path) as ListAttr;

            l.append(val);
            string rootkey = (string)path.get(0);

            System.Reflection.MethodInfo callback = this.GetType().GetMethod("OnAttrChange_" + rootkey);
            if (callback != null)
            {
                callback.Invoke(this, new object[0]);
            }
        }