示例#1
0
 public static bool DestroyDrive()
 {
     var driveService = new OHDriveService();
     var drives = driveService.GetAll().Result;
     var driveToDelete = drives.FirstOrDefault(x => x.Name == "oh-api-test");
     
     return driveService.Destroy(driveToDelete.DriveID).Result;
 }
示例#2
0
        public static OHDrive SetDrive()
        {
            var driveService = new OHDriveService();
            var driveOptions = new OHDriveOptions();
            driveOptions.ClaimType = "exclusive";
            driveOptions.Encryption = "none";
            driveOptions.Tags = new[] { "newtest", "c-sharp-api-v2" };
            var drives = driveService.GetAll().Result;
            var drive = drives.FirstOrDefault(x => x.Name == "oh-api-test");

            return driveService.Set(drive.DriveID, drive.Name, 1073741824, driveOptions).Result;
        }
示例#3
0
 public static List<OHDrive> GetAllDrives()
 {
     var driveService = new OHDriveService();
     
     return driveService.GetAll().Result;
 }