예제 #1
0
 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);
             }
         });
     }
 }
예제 #2
0
 protected override void ProcessRecord()
 {
     if (ParameterSetName.Equals(DataLakeParameterSetName, StringComparison.InvariantCultureIgnoreCase))
     {
         DataLakeAnalyticsClient.RemoveStorageAccount(ResourceGroupName, Account, Blob);
     }
     else
     {
         DataLakeAnalyticsClient.RemoveDataLakeStoreAccount(ResourceGroupName, Account, DataLakeStore);
     }
 }