public override void ExecuteCmdlet()
 {
     if (!string.IsNullOrEmpty(Name))
     {
         // Get for single account
         WriteObject(DataLakeAnalyticsClient.GetAccount(ResourceGroupName, Name));
     }
     else
     {
         // List all accounts in given resource group if avaliable otherwise all accounts in the subscription
         var list = DataLakeAnalyticsClient.ListAccounts(ResourceGroupName, null, null, null);
         WriteObject(list, true);
     }
 }
Exemplo n.º 2
0
 public override void ExecuteCmdlet()
 {
     if (!string.IsNullOrEmpty(Name))
     {
         // Get for single account
         WriteObject(new PSDataLakeAnalyticsAccount(DataLakeAnalyticsClient.GetAccount(ResourceGroupName, Name)));
     }
     else
     {
         // List all accounts in given resource group if avaliable otherwise all accounts in the subscription
         WriteObject(DataLakeAnalyticsClient.ListAccounts(ResourceGroupName, null, null, null)
                     .Select(element => new PSDataLakeAnalyticsAccountBasic(element))
                     .ToList(), true);
     }
 }