/// <summary>
 ///  Returns a list of Cloud Cervice objects for a given subscription. Each cloud service contains some metadata of the actual cloud service
 /// </summary>
 /// <returns>A list of Cloud Serviec objects</returns>
 public CloudServices GetAllCloudServices()
 {
     var subscriptionId = Configuration.SubscriptionId();
     var certificate = Configuration.Base64EncodedManagementCertificate();
     ComputeManagementClient client = new ComputeManagementClient(getCredentials(subscriptionId, certificate));
     try
     {
         var cloudServiceList = client.HostedServices.List();
         CloudServices services = new CloudServices(new List<CloudService>());
         CloudService service = null;
         foreach (var cloudService in cloudServiceList)
         {
             service = new CloudService(cloudService.ServiceName, cloudService.Uri.ToString());
             services.Add(service);
         }
         return services;
     }
     catch (CloudException ce)
     {
         Logger.Warn(ce, String.Format("Exception during retrieval of Cloud Services Exception: {0}", ce));
     }
     return null;
 }
Пример #2
0
 public void Add(CloudService service)
 {
     MyCloudServices.Add(service);
 }
Пример #3
0
 public void Add(CloudService service)
 {
     MyCloudServices.Add(service);
 }