示例#1
0
        public static Session FromValue(Value v)
        {
            Session s = new Session();

            // the answer comes as a struct

            s._sid_id   = v.struct_value["sid_id"].string_value;
            s._nid      = v.struct_value["nid"].int_value;
            s._nick     = v.struct_value["nick"].string_value;
            s._fname    = v.struct_value["fname"].string_value;
            s._lname    = v.struct_value["lname"].string_value;
            s._flags    = v.struct_value["flags"].int_value;
            s._gender   = v.struct_value["gender"].string_value;
            s._locale   = v.struct_value["locale"].string_value;
            s._lang     = v.struct_value["lang"].int_value;
            s._prefs    = v.struct_value["prefs"].int_value;
            s._base_url = BaseUrl.FromValue(v.struct_value["base_url"]);
            s._page     = v.struct_value["page"].string_value;
            s._img      = Img.FromValue(v.struct_value["img"]);

            return(s);
        }
示例#2
0
        public static Img FromValue(Value v)
        {
            Img i = new Img();

            i._icon = v.struct_value["icon"].string_value;
            i._foto = Foto.FromValue(v.struct_value["foto"]);
            return i;
        }