Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a stream as a dynamically-sized VHD file.
 /// </summary>
 /// <param name="stream">The stream to initialize.</param>
 /// <param name="ownsStream">Indicates if the new instance controls the lifetime of the stream.</param>
 /// <param name="capacity">The desired capacity of the new disk</param>
 /// <param name="blockSize">The size of each block (unit of allocation)</param>
 /// <returns>An object that accesses the stream as a VHD file</returns>
 public static Disk InitializeDynamic(Stream stream, Ownership ownsStream, long capacity, long blockSize)
 {
     return(new Disk(DiskImageFile.InitializeDynamic(stream, ownsStream, capacity, blockSize), Ownership.Dispose));
 }
Ejemplo n.º 2
0
 internal static Disk InitializeDynamic(FileLocator fileLocator, string path, long capacity, Geometry geometry, long blockSize)
 {
     return(new Disk(DiskImageFile.InitializeDynamic(fileLocator, path, capacity, geometry, blockSize), Ownership.Dispose));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a stream as a dynamically-sized VHD file.
 /// </summary>
 /// <param name="stream">The stream to initialize.</param>
 /// <param name="ownsStream">Indicates if the new instance controls the lifetime of the stream.</param>
 /// <param name="capacity">The desired capacity of the new disk</param>
 /// <param name="geometry">The desired geometry of the new disk, or <c>null</c> for default</param>
 /// <returns>An object that accesses the stream as a VHD file</returns>
 public static Disk InitializeDynamic(Stream stream, Ownership ownsStream, long capacity, Geometry geometry)
 {
     return(new Disk(DiskImageFile.InitializeDynamic(stream, ownsStream, capacity, geometry), Ownership.Dispose));
 }