public override void ExecuteCmdlet() { ExecutionBlock(() => { base.ExecuteCmdlet(); AzureBackupClient.DeleteVault(Vault.ResourceGroupName, Vault.Name); }); }
public override void ExecuteCmdlet() { ExecutionBlock(() => { base.ExecuteCmdlet(); if (!AzureBackupClient.DeleteVault(Vault.ResourceGroupName, Vault.Name)) { throw new Exception(Resources.ResourceNotFoundMessage); } }); }
protected override void ProcessRecord() { ExecutionBlock(() => { base.ProcessRecord(); if (!AzureBackupClient.DeleteVault(Vault.ResourceGroupName, Vault.Name)) { throw new Exception(Resources.ResourceNotFoundMessage); } }); }