Exemplo n.º 1
0
        /// <summary>
        /// Returns the required key descriptor for the specified formatting style of the contact.
        /// </summary>
        /// <returns>The for required keys for style.</returns>
        /// <param name="style">Style.</param>
        public static CNKeyDescriptor DescriptorForRequiredKeysForStyle(CNContactFormatterStyle style)
        {
            InternalCNKeyDescriptor keyDesc = null;
            var ptr = C.CNContactFormatter_descriptorForRequiredKeysForStyle(style);

            if (PInvokeUtil.IsNotNull(ptr))
            {
                keyDesc = new InternalCNKeyDescriptor(ptr);
                CFFunctions.CFRelease(ptr);
            }
            return(keyDesc);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns the contact name, formatted with the specified formatter.
        /// </summary>
        /// <returns>The from contact.</returns>
        /// <param name="contact">Contact.</param>
        /// <param name="style">Style.</param>
        public static NSString StringFromContact(CNContact contact, CNContactFormatterStyle style)
        {
            if (contact == null)
            {
                return(null);
            }

            NSString str = null;
            var      ptr = C.CNContactFormatter_stringFromContact(contact.ToPointer(), style);

            if (PInvokeUtil.IsNotNull(ptr))
            {
                str = new NSString(ptr);
                CFFunctions.CFRelease(ptr);
            }
            return(str);
        }
Exemplo n.º 3
0
 internal static extern /* NSString */ IntPtr CNContactFormatter_stringFromContact(/* CNContact */ IntPtr contact, CNContactFormatterStyle style);
Exemplo n.º 4
0
 internal static extern /* id<CNKeyDescriptor> */ IntPtr CNContactFormatter_descriptorForRequiredKeysForStyle(CNContactFormatterStyle style);