using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.WindowsAzure.ServiceRuntime; using System.Configuration; namespace HeuristicLab.Services.Optimization.ControllerService.General { public static class Configuration { private static string GetSetting(string setting) { if (RoleEnvironment.IsAvailable) { return RoleEnvironment.GetConfigurationSettingValue(setting); } else { return ConfigurationManager.AppSettings[setting]; } } public static string HiveEndpointName { get { return GetSetting("HiveEndpointName"); } } public static string ControllerEndpointName { get { return GetSetting("ControllerEndpointName"); } } } }