Ejemplo n.º 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));
        }
Ejemplo n.º 2
0
 private extern static Byte[] CFPropertyListCreateFromXMLData(IntPtr allocator, String xmlData,
                                                              CFPropertyListMutabilityOptions optionFlags, StringBuilder errorString);
Ejemplo n.º 3
0
 private static extern IntPtr CFPropertyListCreateFromXMLData(IntPtr allocator, IntPtr xmlData,
                                                              CFPropertyListMutabilityOptions mutabilityOption, ref IntPtr errorString);
Ejemplo n.º 4
0
 internal static extern IntPtr CFPropertyListCreatePtrFromXMLData(IntPtr allocator, IntPtr datas, CFPropertyListMutabilityOptions option, ref IntPtr errorString);
Ejemplo n.º 5
0
 public CFPropertyList DeepCopy(CFPropertyListMutabilityOptions options = CFPropertyListMutabilityOptions.MutableContainersAndLeaves)
 {
     return(new CFPropertyList(CFPropertyListCreateDeepCopy(IntPtr.Zero, handle, (nuint)(ulong)options), owns: true));
 }
Ejemplo n.º 6
0
 private static extern IntPtr CFPropertyListCreateFromXMLData(IntPtr allocator, IntPtr xmlData,
     CFPropertyListMutabilityOptions mutabilityOption, ref IntPtr errorString);
Ejemplo n.º 7
0
 internal static extern IntPtr CFPropertyListCreatePtrFromXMLData(IntPtr allocator, IntPtr datas, CFPropertyListMutabilityOptions option, ref IntPtr errorString);
Ejemplo n.º 8
0
 private static extern Byte[] CFPropertyListCreateFromXMLData(IntPtr allocator, String xmlData,
     CFPropertyListMutabilityOptions optionFlags, StringBuilder errorString);