Ejemplo n.º 1
0
        public Agent(JObject jobj)
        {
            if (jobj["name"] != null)
            {
                name = jobj.Value <string>("name");
            }

            if (jobj["mbox"] != null)
            {
                mbox = jobj.Value <string>("mbox");
            }
            if (jobj["mbox_sha1sum"] != null)
            {
                mbox_sha1sum = jobj.Value <string>("mbox_sha1sum");
            }
            if (jobj["openid"] != null)
            {
                openid = jobj.Value <string>("openid");
            }
            if (jobj["account"] != null)
            {
                account = (AgentAccount)jobj.Value <JObject>("account");
            }
        }
Ejemplo n.º 2
0
        public Agent(JObject jobj)
        {
            if (jobj["name"] != null)
            {
                name = jobj.Value<String>("name");
            }

            if (jobj["mbox"] != null)
            {
                mbox = jobj.Value<String>("mbox");
            }
            if (jobj["mbox_sha1sum"] != null)
            {
                mbox_sha1sum = jobj.Value<String>("mbox_sha1sum");
            }
            if (jobj["openid"] != null)
            {
                openid = jobj.Value<String>("openid");
            }
            if (jobj["account"] != null)
            {
                account = (AgentAccount)jobj.Value<JObject>("account");
            }
        }