/// <summary>
        /// Adds a new disk to be managed.
        /// </summary>
        /// <param name="disk">The disk to manage</param>
        public void Add(VirtualDisk disk)
        {
            PrivateHeader header = DynamicDisk.GetPrivateHeader(disk);

            DynamicDiskGroup group;

            if (_groups.TryGetValue(header.DiskGroupId, out group))
            {
                group.Add(disk);
            }
            else
            {
                group = new DynamicDiskGroup(disk);
                _groups.Add(header.DiskGroupId, group);
            }
        }
Exemple #2
0
 internal DynamicVolume(DynamicDiskGroup group, Guid volumeId)
 {
     _group    = group;
     _volumeId = volumeId;
 }
 internal DynamicVolume(DynamicDiskGroup group, Guid volumeId)
 {
     _group = group;
     _volumeId = volumeId;
 }
        /// <summary>
        /// Adds a new disk to be managed.
        /// </summary>
        /// <param name="disk">The disk to manage</param>
        public void Add(VirtualDisk disk)
        {
            PrivateHeader header = DynamicDisk.GetPrivateHeader(disk);

            DynamicDiskGroup group;
            if (_groups.TryGetValue(header.DiskGroupId, out group))
            {
                group.Add(disk);
            }
            else
            {
                group = new DynamicDiskGroup(disk);
                _groups.Add(header.DiskGroupId, group);
            }
        }