Example #1
0
        private void ContactsOnSearchCompleted(object sender, ContactsSearchEventArgs e)
        {
            List <InputContact> contacts = new List <InputContact>();

            foreach (Contact contact in e.Results)
            {
                if (contact.PhoneNumbers.Count() == 0)
                {
                    continue;
                }

                string phoneNumber = contact.PhoneNumbers.ToList()[0].PhoneNumber ?? "";
                string firstName   = contact.CompleteName.FirstName ?? "";
                string lastName    = contact.CompleteName.LastName ?? "";

                InputContact inputPhoneContact = TL.inputPhoneContact(0, phoneNumber, firstName,
                                                                      lastName);

                contacts.Add(inputPhoneContact);
            }

            SyncContacts(contacts);
        }
 public ImportContactRequest(InputContact contact, bool shouldReplace = true)
 {
     Contact = contact;
     Replace = shouldReplace;
 }
 public ImportContactRequest(InputContact contact, bool shouldReplace = true)
 {
     Contact = contact;
     Replace = shouldReplace;
 }