public async Task GetDisks() { var sut = new LowLevelApi(); var disk = await sut.GetDisks(); Assert.NotNull(disk); }
public override async Task <Disk> GetDeviceDisk() { if (disk == null) { var disks = await LowLevelApi.GetDisks(); return(disks.First(x => x.Number == diskNumber)); } return(disk); }
public override async Task <Disk> GetDeviceDisk() { var disks = await LowLevelApi.GetDisks(); foreach (var disk in disks.Where(x => x.Number != 0)) { if (true) { var volumes = await disk.GetVolumes(); var mainOsVol = volumes.FirstOrDefault(x => x.Label == MainOsLabel); if (mainOsVol != null) { return(disk); } } } throw new PhoneDiskNotFoundException("Cannot get the Phone Disk. Please, verify that the Phone is in Mass Storage Mode."); }