Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the PhysicalVolumeInfo class.
 /// </summary>
 /// <param name="diskId">The containing disk's identity</param>
 /// <param name="disk">The disk containing the partition</param>
 /// <param name="partitionInfo">Information about the partition</param>
 /// <remarks>Use this constructor to represent a (BIOS or GPT) partition</remarks>
 internal PhysicalVolumeInfo(
     string diskId,
     VirtualDisk disk,
     PartitionInfo partitionInfo)
 {
     _diskId = diskId;
     _disk = disk;
     _streamOpener = partitionInfo.Open;
     _type = partitionInfo.VolumeType;
     _partitionInfo = partitionInfo;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the PhysicalVolumeInfo class.
 /// </summary>
 /// <param name="diskId">The identity of the disk</param>
 /// <param name="disk">The disk itself</param>
 /// <remarks>Use this constructor to represent an entire disk as a single volume.</remarks>
 internal PhysicalVolumeInfo(
     string diskId,
     VirtualDisk disk)
 {
     _diskId = diskId;
     _disk = disk;
     _streamOpener = delegate { return new SubStream(disk.Content, Ownership.None, 0, disk.Capacity); };
     _type = PhysicalVolumeType.EntireDisk;
 }