Exemplo n.º 1
0
 /// <summary>
 /// Creates a new instance from an existing stream, differencing disks not supported.
 /// </summary>
 /// <param name="stream">The stream to read</param>
 public Disk(Stream stream)
 {
     _diskImage = new DiskImageFile(stream);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new instance from an existing stream, differencing disks not supported.
 /// </summary>
 /// <param name="stream">The stream to read</param>
 /// <param name="ownsStream">Indicates if the new disk should take ownership of <paramref name="stream"/> lifetime.</param>
 public Disk(Stream stream, Ownership ownsStream)
 {
     _diskImage = new DiskImageFile(stream, ownsStream);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new instance from an existing disk file.
 /// </summary>
 /// <param name="file">The file containing the disk image.</param>
 public Disk(DiskImageFile file)
 {
     _diskImage = file;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the Disk class.  Differencing disks are not supported.
 /// </summary>
 /// <param name="stream">The stream to read.</param>
 /// <param name="ownsStream">Indicates if the new disk should take ownership of <paramref name="stream"/> lifetime.</param>
 public Disk(Stream stream, Ownership ownsStream)
 {
     _diskImage = new DiskImageFile(stream, ownsStream);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the Disk class.  Differencing disks are not supported.
 /// </summary>
 /// <param name="stream">The stream to read.</param>
 public Disk(Stream stream)
 {
     _diskImage = new DiskImageFile(stream);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the Disk class.
 /// </summary>
 /// <param name="file">The file containing the disk image.</param>
 public Disk(DiskImageFile file)
 {
     _diskImage = file;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a stream as a dynamically-sized VDI 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>
 /// <returns>An object that accesses the stream as a VDI file.</returns>
 public static Disk InitializeDynamic(Stream stream, Ownership ownsStream, long capacity)
 {
     return(new Disk(DiskImageFile.InitializeDynamic(stream, ownsStream, capacity)));
 }