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)); }
private extern static Byte[] CFPropertyListCreateFromXMLData(IntPtr allocator, String xmlData, CFPropertyListMutabilityOptions optionFlags, StringBuilder errorString);
private static extern IntPtr CFPropertyListCreateFromXMLData(IntPtr allocator, IntPtr xmlData, CFPropertyListMutabilityOptions mutabilityOption, ref IntPtr errorString);
internal static extern IntPtr CFPropertyListCreatePtrFromXMLData(IntPtr allocator, IntPtr datas, CFPropertyListMutabilityOptions option, ref IntPtr errorString);
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);
internal static extern IntPtr CFPropertyListCreatePtrFromXMLData(IntPtr allocator, IntPtr datas, CFPropertyListMutabilityOptions option, ref IntPtr errorString);
private static extern Byte[] CFPropertyListCreateFromXMLData(IntPtr allocator, String xmlData, CFPropertyListMutabilityOptions optionFlags, StringBuilder errorString);