/// <summary> /// Delete current selected file /// </summary> public async void DeleteSelectedFile() { try { if (!info.CanModifyFile) { PopUpWarning("Please Select a file!"); return; } requestMessage = "Send request: Delete selected file"; if (await AzureStorageManager.DeleteBlob(info.Container, SelectedFile, LogEvent) == true) { PopUpWarning("Send request: Delete selected file\n" + "Delete successfully!"); DeleteBlobOnDataBaseOnVersion(ParseFilenameToVersion(SelectedFile)); } else { PopUpWarning("Failed to delete!"); } } catch (StorageException ex) { PopUpWarning(ex.Message); } finally { ClearRightClickMenu(); RefreshPage(); } }
/// <summary> /// Delete blob file on Azure storage /// </summary> /// <param name="name_Container">Name of container</param> /// <param name="Name_ZipPatch">Name of zipped patch file</param> /// <param name="onComplete">Delete OnComplete callback</param> public async void DeleteCloudFileByName(string name_Container, string Name_ZipPatch, Action <bool, string, string> onComplete) { try { await AzureStorageManager.DeleteBlob(name_Container, Name_ZipPatch, (bool result) => onComplete(result, "Successfully delete file " + Name_ZipPatch, "Failed to delete file " + Name_ZipPatch)); } catch (Exception ex) { PrintError("Name of file is not specified. Error message: " + ex.Message); } }