public List <string> GetAvailableRegions()
        {
            List <string> returnLst           = new List <string>();
            IDictionary <string, string> dict = schedulerManagementClient.GetResourceProviderProperties().Properties;

            dict[SupportedRegionsKey].Split(',').ToList().ForEach(s => returnLst.Add(s));
            return(returnLst);
        }
        /// <summary>
        /// Creates new Scheduler Management Convenience Client
        /// </summary>
        /// <param name="subscription">Subscription containing websites to manipulate</param>
        public SchedulerMgmntClient(WindowsAzureSubscription subscription)
        {
            currentSubscription       = subscription;
            csmClient                 = subscription.CreateClient <CloudServiceManagementClient>();
            schedulerManagementClient = subscription.CreateClient <SchedulerManagementClient>();

            //Get RP properties
            IDictionary <string, string> dict = schedulerManagementClient.GetResourceProviderProperties().Properties;

            //Get available regions
            string val = string.Empty;

            if (dict.TryGetValue(SupportedRegionsKey, out val))
            {
                AvailableRegions = new List <string>();
                val.Split(',').ToList().ForEach(s => AvailableRegions.Add(s));
            }

            //Store global counts for max jobs and min recurrence for each plan
            if (dict.TryGetValue(FreeMaxJobCountKey, out val))
            {
                FreeMaxJobCountValue = Convert.ToInt32(dict[FreeMaxJobCountKey]);
            }

            if (dict.TryGetValue(FreeMinRecurrenceKey, out val))
            {
                FreeMinRecurrenceValue = TimeSpan.Parse(dict[FreeMinRecurrenceKey]);
            }

            if (dict.TryGetValue(StandardMaxJobCountKey, out val))
            {
                StandardMaxJobCountValue = Convert.ToInt32(dict[StandardMaxJobCountKey]);
            }

            if (dict.TryGetValue(StandardMinRecurrenceKey, out val))
            {
                StandardMinRecurrenceValue = TimeSpan.Parse(dict[StandardMinRecurrenceKey]);
            }

            if (dict.TryGetValue(PremiumMaxJobCountKey, out val))
            {
                PremiumMaxJobCountValue = Convert.ToInt32(dict[PremiumMaxJobCountKey]);
            }

            if (dict.TryGetValue(PremiumMinRecurrenceKey, out val))
            {
                PremiumMinRecurrenceValue = TimeSpan.Parse(dict[PremiumMinRecurrenceKey]);
            }
        }
 public static void QueryRegisteredSchedulerProperties(CertificateCloudCredentials credentials)
 {
     try
     {
         var schedulerServiceClient = new SchedulerManagementClient(credentials);
         var result3 = schedulerServiceClient.GetResourceProviderProperties();
         foreach (var prop in result3.Properties)
         {
             Console.WriteLine("QueryRegisteredSchedulerProperties :\n" + prop.Key + ": " + prop.Value);
         }
         Console.ReadLine();
     }
     catch (Exception e)
     {
         Console.WriteLine("QueryRegisteredSchedulerProperties Exception :\n" + e.Message);
         throw;
     }
 }