public override void ExecuteCmdlet() { if (ParameterSetName.Equals(DataLakeParameterSetName, StringComparison.InvariantCultureIgnoreCase)) { ConfirmAction( Force.IsPresent, string.Format(Resources.RemovingDataLakeAnalyticsDataLakeStore, DataLakeStore), string.Format(Resources.RemoveDataLakeAnalyticsCatalogSecret, DataLakeStore), DataLakeStore, () => { DataLakeAnalyticsClient.RemoveDataLakeStoreAccount(ResourceGroupName, Account, DataLakeStore); if (PassThru) { WriteObject(true); } }); } else { ConfirmAction( Force.IsPresent, string.Format(Resources.RemovingDataLakeAnalyticsBlobAccount, Blob), string.Format(Resources.RemoveDataLakeAnalyticsBlobAccount, Blob), Blob, () => { DataLakeAnalyticsClient.RemoveStorageAccount(ResourceGroupName, Account, Blob); if (PassThru) { WriteObject(true); } }); } }
protected override void ProcessRecord() { if (ParameterSetName.Equals(DataLakeParameterSetName, StringComparison.InvariantCultureIgnoreCase)) { DataLakeAnalyticsClient.RemoveStorageAccount(ResourceGroupName, Account, Blob); } else { DataLakeAnalyticsClient.RemoveDataLakeStoreAccount(ResourceGroupName, Account, DataLakeStore); } }