public override void ExecuteCmdlet() { if (string.IsNullOrEmpty(Name)) { ConfirmAction( Force.IsPresent, string.Format(Resources.RemovingDataLakeAnalyticsCatalogSecrets, DatabaseName), string.Format(Resources.RemoveDataLakeAnalyticsCatalogSecrets, DatabaseName), DatabaseName, () => { DataLakeAnalyticsClient.DeleteSecret(Account, DatabaseName, Name); if (PassThru) { WriteObject(true); } }); } else { ConfirmAction( Force.IsPresent, string.Format(Resources.RemovingDataLakeAnalyticsCatalogSecret, Name), string.Format(Resources.RemoveDataLakeAnalyticsCatalogSecret, Name), Name, () => { DataLakeAnalyticsClient.DeleteSecret(Account, DatabaseName, Name); if (PassThru) { WriteObject(true); } }); } }
protected override void ProcessRecord() { if (!Force.IsPresent) { ConfirmAction( Force.IsPresent, string.Format(Resources.RemovingDataLakeAnalyticsCatalogSecret, Name), string.Format(Resources.RemoveDataLakeAnalyticsCatalogSecret, Name), Name, () => DataLakeAnalyticsClient.DeleteSecret(ResourceGroupName, Account, DatabaseName, Name)); } else { DataLakeAnalyticsClient.DeleteSecret(ResourceGroupName, Account, DatabaseName, Name); } if (PassThru) { WriteObject(true); } }