Example #1
0
        /// <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);
            }
        }
Example #2
0
 internal DynamicVolume(DynamicDiskGroup group, Guid volumeId)
 {
     _group    = group;
     _volumeId = volumeId;
 }