Ejemplo n.º 1
0
        public async Task GetPartitions()
        {
            var sut        = new LowLevelApi();
            var partitions = await sut.GetPartitions(await sut.GetPhoneDisk());

            Assert.NotNull(partitions);
        }
Ejemplo n.º 2
0
        public async Task GetVolume()
        {
            var sut       = new LowLevelApi();
            var partition = (await sut.GetPartitions(await sut.GetPhoneDisk())).Skip(2).First();
            var volume    = await sut.GetVolume(partition);

            Assert.NotNull(volume);
        }
Ejemplo n.º 3
0
        public async Task <Partition> GetBootEfiEspPartition()
        {
            var parts = await LowLevelApi.GetPartitions(this);

            return(parts
                   .OrderByDescending(x => x.Number)
                   .FirstOrDefault(x => Equals(x.PartitionType, PartitionType.Esp)));
        }
Ejemplo n.º 4
0
        public async Task AssignLetter()
        {
            var sut       = new LowLevelApi();
            var phoneDisk = await sut.GetPhoneDisk();

            var partitionToFormat = (await sut.GetPartitions(phoneDisk)).Single(x => x.Number == 6);
            var toAssign          = await sut.GetVolume(partitionToFormat);

            await sut.AssignDriveLetter(toAssign, 'I');
        }
Ejemplo n.º 5
0
        public async Task Format()
        {
            var sut       = new LowLevelApi();
            var phoneDisk = await sut.GetPhoneDisk();

            var partitionToFormat = (await sut.GetPartitions(phoneDisk)).Single(x => x.Number == 6);
            var toFormat          = await sut.GetVolume(partitionToFormat);

            await sut.Format(toFormat, FileSystemFormat.Ntfs, "Test");
        }
Ejemplo n.º 6
0
        public async Task <Partition> GetReservedPartition()
        {
            var parts = await LowLevelApi.GetPartitions(this);

            return(parts.FirstOrDefault(x => Equals(x.PartitionType, PartitionType.Reserved)));
        }
Ejemplo n.º 7
0
 public Task <List <Partition> > GetPartitions()
 {
     return(LowLevelApi.GetPartitions(this));
 }