Пример #1
0
        public static string GetCompositeNameDelimiter(ABRecord record)
        {
            var handle = ABPersonCopyCompositeNameDelimiterForRecord(record == null ? IntPtr.Zero : record.Handle);

            if (handle == IntPtr.Zero)
            {
                return(null);
            }
            return(new CFString(handle, true));
        }
Пример #2
0
        public ABPerson(ABRecord source)
            : base(IntPtr.Zero, true)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            Handle = ABPersonCreateInSource(source.Handle);
        }
Пример #3
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)));
        }
Пример #4
0
 public static ABPersonCompositeNameFormat GetCompositeNameFormat(ABRecord record)
 {
     return(ABPersonGetCompositeNameFormatForRecord(record == null ? IntPtr.Zero : record.Handle));
 }