Ejemplo n.º 1
0
        private Dictionary <string, PhysicalVolumeInfo> ScanForPhysicalVolumes()
        {
            Dictionary <string, PhysicalVolumeInfo> result = new Dictionary <string, PhysicalVolumeInfo>();

            // First scan physical volumes
            for (int i = 0; i < _disks.Count; ++i)
            {
                VirtualDisk disk   = _disks[i];
                string      diskId = GetDiskId(i);

                if (PartitionTable.IsPartitioned(disk.Content))
                {
                    foreach (var table in PartitionTable.GetPartitionTables(disk.Content))
                    {
                        foreach (var part in table.Partitions)
                        {
                            PhysicalVolumeInfo pvi = new PhysicalVolumeInfo(diskId, disk, part);
                            result.Add(pvi.Identity, pvi);
                        }
                    }
                }
                else
                {
                    PhysicalVolumeInfo pvi = new PhysicalVolumeInfo(diskId, disk);
                    result.Add(pvi.Identity, pvi);
                }
            }

            return(result);
        }
Ejemplo n.º 2
0
 internal LogicalVolumeInfo(Guid guid, PhysicalVolumeInfo physicalVolume, SparseStreamOpenDelegate opener, long length, byte biosType, LogicalVolumeStatus status)
 {
     _guid        = guid;
     _physicalVol = physicalVolume;
     _opener      = opener;
     _length      = length;
     _biosType    = biosType;
     _status      = status;
 }
Ejemplo n.º 3
0
 public abstract bool HandlesPhysicalVolume(PhysicalVolumeInfo volume);