Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new <see cref="PlistHandle"/> from a <see cref="IntPtr"/>.
        /// </summary>
        /// <param name="unsafeHandle">
        /// The underlying <see cref="IntPtr"/>
        /// </param>
        /// <param name="ownsHandle">
        /// <see langword="true"/> to reliably release the handle during the finalization phase; <see langword="false"/> to prevent reliable release (not recommended).
        /// </param>
        /// <returns>
        /// </returns>
        public static PlistHandle DangerousCreate(System.IntPtr unsafeHandle, bool ownsHandle)
        {
            PlistHandle safeHandle = new PlistHandle(ownsHandle);

            safeHandle.SetHandle(unsafeHandle);
            return(safeHandle);
        }