private Abstractions.Phone Convert(ContactPhone contactPhone) { Abstractions.Phone phone = new Abstractions.Phone(); phone.Number = contactPhone.Number; phone.Label = contactPhone.Description; phone.Type = Convert(contactPhone.Kind); return(phone); }
internal static Phone GetPhone(ICursor c, Resources resources) { Phone p = new Phone(); p.Number = GetString(c, ContactsContract.CommonDataKinds.Phone.Number); PhoneDataKind pkind = (PhoneDataKind)c.GetInt(c.GetColumnIndex(CommonColumns.Type)); p.Type = pkind.ToPhoneType(); p.Label = (pkind != PhoneDataKind.Custom) ? ContactsContract.CommonDataKinds.Phone.GetTypeLabel(resources, pkind, String.Empty) : c.GetString(CommonColumns.Label); return p; }