Beispiel #1
0
        public ABPerson(ABRecord source)
            : base(IntPtr.Zero, true)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            Handle = ABPersonCreateInSource(source.Handle);
        }
Beispiel #2
0
        public static ABPerson[] CreateFromVCard(ABRecord source, NSData vCardData)
        {
            if (vCardData == null)
            {
                throw new ArgumentNullException("vCardData");
            }

            // TODO: SIGSEGV when source is not null
            var res = ABPersonCreatePeopleInSourceWithVCardRepresentation(source == null ? IntPtr.Zero : source.Handle,
                                                                          vCardData.Handle);

            return(NSArray.ArrayFromHandle(res, l => new ABPerson(l, null)));
        }