コード例 #1
0
ファイル: ABPerson.cs プロジェクト: sbomer/xamarin-macios
        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
ファイル: ABPerson.cs プロジェクト: sbomer/xamarin-macios
        public ABPerson(ABRecord source)
            : base(IntPtr.Zero, true)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            Handle = ABPersonCreateInSource(source.Handle);
        }
コード例 #3
0
ファイル: ABPerson.cs プロジェクト: sbomer/xamarin-macios
        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
ファイル: ABPerson.cs プロジェクト: sbomer/xamarin-macios
 public static ABPersonCompositeNameFormat GetCompositeNameFormat(ABRecord record)
 {
     return(ABPersonGetCompositeNameFormatForRecord(record == null ? IntPtr.Zero : record.Handle));
 }