Ejemplo n.º 1
0
 public override void ExecuteCmdlet()
 {
     if (SubscriptionId != null)
     {
         var response = AzureReservationAPIClient.GetCatalog(SubscriptionId).Select(x => new PSCatalog(x));
         WriteObject(response, true);
     }
     else
     {
         var response = AzureReservationAPIClient.GetCatalog(DefaultContext.Subscription.Id).Select(x => new PSCatalog(x));
         WriteObject(response, true);
     }
 }
Ejemplo n.º 2
0
 public override void ExecuteCmdlet()
 {
     if (SubscriptionId != default(Guid))
     {
         var response = AzureReservationAPIClient
                        .GetCatalog(SubscriptionId.ToString(), ReservedResourceType, Location)
                        .Select(x => new PSCatalog(x));
         WriteObject(response, true);
     }
     else
     {
         var response = AzureReservationAPIClient
                        .GetCatalog(DefaultContext.Subscription.Id, ReservedResourceType, Location)
                        .Select(x => new PSCatalog(x));
         WriteObject(response, true);
     }
 }