private void ValidateAzureWorkloadBackupManagementType( CmdletModel.BackupManagementType backupManagementType) { if (backupManagementType != CmdletModel.BackupManagementType.AzureWorkload) { throw new ArgumentException(string.Format(Resources.UnExpectedBackupManagementTypeException, CmdletModel.BackupManagementType.AzureWorkload.ToString(), backupManagementType.ToString())); } }
/// <summary> /// Helper function to get job type from ps backupmanagement type. /// </summary> public static string GetJobTypeForService(CmdletModel.BackupManagementType mgmtType) { switch (mgmtType) { case CmdletModel.BackupManagementType.AzureVM: return(BackupManagementType.AzureIaasVM.ToString()); default: throw new Exception("Invalid BackupManagementType provided: " + mgmtType); } }