public ABRecord [] GetMembers (ABPersonSortBy sortOrdering) { var cfArrayRef = ABGroupCopyArrayOfAllMembersWithSortOrdering (Handle, sortOrdering); if (cfArrayRef == IntPtr.Zero) return new ABRecord [0]; return NSArray.ArrayFromHandle (cfArrayRef, h => ABRecord.FromHandle (h, AddressBook)); }
public ABPerson [] GetPeople(ABRecord source, ABPersonSortBy sortOrdering) { if (source is null) { throw new ArgumentNullException(nameof(source)); } var cfArrayRef = ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering(GetCheckedHandle(), source.Handle, sortOrdering); return(NSArray.ArrayFromHandle(cfArrayRef, l => new ABPerson(l, this))); }
public ABPerson [] GetPeople(ABRecord source, ABPersonSortBy sortOrdering) { if (source == null) { throw new ArgumentNullException("source"); } ThrowIfDisposed(); IntPtr cfArrayRef = ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering(Handle, source.Handle, sortOrdering); return(NSArray.ArrayFromHandle(cfArrayRef, l => new ABPerson(l, this))); }
public int CompareTo(ABPerson other, ABPersonSortBy ordering) { if (other == null) { throw new ArgumentNullException("other"); } if (ordering != ABPersonSortBy.FirstName && ordering != ABPersonSortBy.LastName) { throw new ArgumentException("Invalid ordering value: " + ordering, "ordering"); } return(ABPersonComparePeopleByName(Handle, other.Handle, ordering)); }
extern static IntPtr ABGroupCopyArrayOfAllMembersWithSortOrdering(IntPtr group, ABPersonSortBy sortOrdering);
extern static IntPtr ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering(IntPtr addressBook, IntPtr source, ABPersonSortBy sortOrdering);
extern static int ABPersonComparePeopleByName(IntPtr person1, IntPtr person2, ABPersonSortBy ordering);