/// <summary> /// Gets the storage settings. /// </summary> /// <returns>ApplicationSettings.</returns> public static ApplicationSettings GetSettings() { var settings = new ApplicationSettings(); using (var factory = Database.CreateSessionFactory()) using (var session = factory.OpenSession()) { IConfigurationService configuration = new MomntzConfiguration(session); settings.CloudUrl = configuration.GetValueByKey("cloudurl"); settings.CloudAccount = configuration.GetValueByKey("cloudaccount"); settings.CloudKey = configuration.GetValueByKey("cloudkey"); settings.ServiceBusEndpoint = configuration.GetValueByKey("ServiceBus.Queue"); settings.LoggingFilePath = configuration.GetValueByKey("LogToFile"); settings.UILoggingEndpoint = configuration.GetValueByKey("UILogging.Endpoint"); settings.ServiceLoggingEndpoint = configuration.GetValueByKey("ServiceLogging.Endpoint"); } return(settings); }
/// <summary> /// Gets the storage settings. /// </summary> /// <returns>ApplicationSettings.</returns> public static ApplicationSettings GetSettings() { var settings = new ApplicationSettings(); using (var factory = Database.CreateSessionFactory()) using (var session = factory.OpenSession()) { IConfigurationService configuration = new MomntzConfiguration(session); settings.CloudUrl = configuration.GetValueByKey("cloudurl"); settings.CloudAccount = configuration.GetValueByKey("cloudaccount"); settings.CloudKey = configuration.GetValueByKey("cloudkey"); settings.ServiceBusEndpoint = configuration.GetValueByKey("ServiceBus.Queue"); settings.LoggingFilePath = configuration.GetValueByKey("LogToFile"); settings.UILoggingEndpoint = configuration.GetValueByKey("UILogging.Endpoint"); settings.ServiceLoggingEndpoint = configuration.GetValueByKey("ServiceLogging.Endpoint"); } return settings; }