public static List <DynamicVolume> GetLockableDynamicVolumes(List <DynamicDisk> dynamicDisks)
        {
            List <DynamicVolume> result = new List <DynamicVolume>();

            List <DynamicDisk> disks = new List <DynamicDisk>();

            foreach (DynamicDisk dynamicDisk in dynamicDisks)
            {
                if (dynamicDisk.Disk is PhysicalDisk)
                {
                    disks.Add(dynamicDisk);
                }
            }

            List <DynamicVolume> dynamicVolumes = DynamicVolumeHelper.GetDynamicVolumes(disks);

            for (int index = 0; index < dynamicVolumes.Count; index++)
            {
                // non-operational volumes cannot be locked
                if (!dynamicVolumes[index].IsOperational)
                {
                    dynamicVolumes.RemoveAt(index);
                    index--;
                }
            }
            return(dynamicVolumes);
        }
        public static List <DynamicVolume> GetDynamicVolumes()
        {
            List <DynamicDisk> disks = WindowsDynamicDiskHelper.GetPhysicalDynamicDisks();

            return(DynamicVolumeHelper.GetDynamicVolumes(disks));
        }