示例#1
0
 /// <summary>DataObj constructor.</summary>
 public DataObjWhisperReceived(JToken json)
 {
     Id        = json.SelectToken("id").ToString();
     ThreadId  = json.SelectToken("thread_id")?.ToString();
     Body      = json.SelectToken("body")?.ToString();
     SentTs    = long.Parse(json.SelectToken("sent_ts").ToString());
     FromId    = long.Parse(json.SelectToken("from_id").ToString());
     Tags      = new TagsObj(json.SelectToken("tags"));
     Recipient = new RecipientObj(json.SelectToken("recipient"));
     Nonce     = json.SelectToken("nonce")?.ToString();
 }
示例#2
0
 public DataObj(JToken json)
 {
     Id = int.Parse(json.SelectToken("id").ToString());
     ThreadId = json.SelectToken("thread_id")?.ToString();
     Body = json.SelectToken("body")?.ToString();
     SentTs = long.Parse(json.SelectToken("sent_ts").ToString());
     FromId = long.Parse(json.SelectToken("from_id").ToString());
     Tags = new TagsObj(json.SelectToken("tags"));
     Recipient = new RecipientObj(json.SelectToken("recipient"));
     Nonce = json.SelectToken("nonce")?.ToString();
 }