Esempio n. 1
0
 private config.Environment GetEnvironment()
 {
     try
     {
         config.Environment returnValue     = null;
         String             environmentName = ConfigurationManager.AppSettings.Get("ENVIRONMENT");
         if (!String.IsNullOrEmpty(environmentName))
         {
             EnvironmentsSection       environmentsSection = (EnvironmentsSection)ConfigurationManager.GetSection("environments");
             List <config.Environment> environments        = new List <config.Environment>(environmentsSection.Environments);
             returnValue = environments.Find(x => x.Name == environmentName);
         }
         return(returnValue);
     } catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 2
0
 static ExternalIHelperConfigSettingsFactory()
 {
     config = (EnvironmentsSection)ConfigurationManager.GetSection("ExternalIHelperEnvironments");
 }