public static void OnSuccessTrigger(string message)
 {
     if (_onSuccessAction != null)
     {
         var contact = ContactPickResult.FromJson(message);
         _onSuccessAction(contact);
     }
 }
Ejemplo n.º 2
0
        public static ContactPickResult FromJson(string json)
        {
            var contact = new ContactPickResult();
            var dic     = Json.Deserialize(json) as Dictionary <string, object>;

            contact.DisplayName = dic.GetStr("displayName");
            contact.PhotoUri    = dic.GetStr("photoUri");
            contact.Phones      = ((List <object>)dic["phones"]).OfType <string>().ToList();
            contact.Emails      = ((List <object>)dic["emails"]).OfType <string>().ToList();

            return(contact);
        }