Exemple #1
0
        // this method will deserialize chat json string
        public static void DeserializeDMs(string json)
        {
            DMChatList.Clear();

            JArray jarr = JArray.Parse(json);

            // get the results fragment of the json as a list of JTokens
            List <JToken> results = jarr.Children().ToList();

            // populate the list
            foreach (JToken result in results)
            {
                DirectMessage dm = result.ToObject <DirectMessage>();
                DMChatList.Add(dm);
            }
        }
Exemple #2
0
 public static void ClearDMs()
 {
     DMChatList.Clear();
 }