/// <summary> /// Initializes a stream as a differencing disk VHDX file. /// </summary> /// <param name="stream">The stream to initialize.</param> /// <param name="ownsStream">Indicates if the new instance controls the lifetime of the <paramref name="stream"/>.</param> /// <param name="parent">The disk this file is a different from.</param> /// <param name="ownsParent">Indicates if the new instance controls the lifetime of the <paramref name="parent"/> file.</param> /// <param name="parentAbsolutePath">The full path to the parent disk.</param> /// <param name="parentRelativePath">The relative path from the new disk to the parent disk.</param> /// <param name="parentModificationTime">The time the parent disk's file was last modified (from file system).</param> /// <returns>An object that accesses the stream as a VHDX file</returns> public static Disk InitializeDifferencing( Stream stream, Ownership ownsStream, DiskImageFile parent, Ownership ownsParent, string parentAbsolutePath, string parentRelativePath, DateTime parentModificationTime) { DiskImageFile file = DiskImageFile.InitializeDifferencing(stream, ownsStream, parent, parentAbsolutePath, parentRelativePath, parentModificationTime); return(new Disk(file, Ownership.Dispose, parent, ownsParent)); }