Example #1
0
        FromData(NSData data, CFPropertyListMutabilityOptions options = CFPropertyListMutabilityOptions.Immutable)
        {
            if (data == null)
            {
                throw new ArgumentNullException(nameof(data));
            }
            if (data.Handle == IntPtr.Zero)
            {
                throw new ObjectDisposedException(nameof(data));
            }

            nint   fmt;
            IntPtr error;
            var    ret = CFPropertyListCreateWithData(IntPtr.Zero, data.Handle, (nuint)(ulong)options, out fmt, out error);

            if (ret != IntPtr.Zero)
            {
                return(new CFPropertyList(ret, owns: true), (CFPropertyListFormat)(long)fmt, null);
            }
            return(null, CFPropertyListFormat.XmlFormat1, new NSError(error));
        }
Example #2
0
 private extern static Byte[] CFPropertyListCreateFromXMLData(IntPtr allocator, String xmlData,
                                                              CFPropertyListMutabilityOptions optionFlags, StringBuilder errorString);
Example #3
0
 private static extern IntPtr CFPropertyListCreateFromXMLData(IntPtr allocator, IntPtr xmlData,
                                                              CFPropertyListMutabilityOptions mutabilityOption, ref IntPtr errorString);
Example #4
0
 internal static extern IntPtr CFPropertyListCreatePtrFromXMLData(IntPtr allocator, IntPtr datas, CFPropertyListMutabilityOptions option, ref IntPtr errorString);
Example #5
0
 public CFPropertyList DeepCopy(CFPropertyListMutabilityOptions options = CFPropertyListMutabilityOptions.MutableContainersAndLeaves)
 {
     return(new CFPropertyList(CFPropertyListCreateDeepCopy(IntPtr.Zero, handle, (nuint)(ulong)options), owns: true));
 }
 private static extern IntPtr CFPropertyListCreateFromXMLData(IntPtr allocator, IntPtr xmlData,
     CFPropertyListMutabilityOptions mutabilityOption, ref IntPtr errorString);
Example #7
0
 internal static extern IntPtr CFPropertyListCreatePtrFromXMLData(IntPtr allocator, IntPtr datas, CFPropertyListMutabilityOptions option, ref IntPtr errorString);
Example #8
0
 private static extern Byte[] CFPropertyListCreateFromXMLData(IntPtr allocator, String xmlData,
     CFPropertyListMutabilityOptions optionFlags, StringBuilder errorString);