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));
 }
예제 #2
0
        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)));
        }
예제 #3
0
        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)));
        }
예제 #4
0
 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));
 }
예제 #5
0
 extern static IntPtr ABGroupCopyArrayOfAllMembersWithSortOrdering(IntPtr group, ABPersonSortBy sortOrdering);
예제 #6
0
 extern static IntPtr ABAddressBookCopyArrayOfAllPeopleInSourceWithSortOrdering(IntPtr addressBook, IntPtr source, ABPersonSortBy sortOrdering);
예제 #7
0
 extern static int ABPersonComparePeopleByName(IntPtr person1, IntPtr person2, ABPersonSortBy ordering);