private void LoadConnectionSettings(string vasaURI, string sectionName) { var vasa = new VasaClient(vasaURI); var common = vasa.GetConfigSections(null, sectionName).Single(); if (common["RabbitServer", false] != null) { this.GetOldRabbitSettings(common); } else { this.GetNewRabbitSettings(common); } }
static ServerSettings() { try { var vasa = new VasaClient("ValidationServer"); var section = vasa.GetConfigSections(null, "Server").Single(); var a = section["AdditionalStartupTime", false]; var wu = section["WebAPIUrl"]; AdditionalStartupTime = (string.IsNullOrWhiteSpace(a)) ? TimeSpan.FromSeconds(30) : TimeSpan.FromSeconds(Convert.ToInt32(a)); WebAPIUrl = wu.Replace("{localhost}", Environment.MachineName); } catch (Exception ex) { log.Fatal(ex, "There was a problem configuring the server settings"); throw; } }