Used to return a list of hosted services to the client
Inheritance: ServiceCommand
 /// <summary>
 /// Gets a list of cloud services with their attached deployments
 /// </summary>
 List<CloudService> IQueryCloudService.GetCloudServiceListWithDeployments()
 {
     var cloudServices = ((IQueryCloudService)this).GetHostedServiceList();
     foreach (var cloudService in cloudServices)
     {
         var command = new GetCloudServicePropertiesCommand(cloudService.Name)
         {
             SubscriptionId = SubscriptionId,
             Certificate = ManagementCertificate
         };
         command.Execute();
         cloudService.Deployments = command.CloudServiceDeployments;
     }
     return cloudServices;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Gets the status of all role instances in a deployment
 /// </summary>
 public IEnumerable<RoleInstance> GetRoleInstances()
 {
     var command = new GetCloudServicePropertiesCommand(Name)
     {
         SubscriptionId = SubscriptionId,
         Certificate = ManagementCertificate
     };
     command.Execute();
     return command.CloudServiceDeployments.First(slot => slot.Slot == Slot)
         .RoleInstances.ToList();
 }