Esempio n. 1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        static DataCenters()
        {
            // Grab the Data Centers listed in the App.config and add them to our list.
            var customSection = ConfigurationManager.GetSection(CustomConfigurationSection.SectionName) as CustomConfigurationSection;

            if (customSection != null)
            {
                foreach (DataCenterElement dataCenterElement in customSection.DataCenters)
                {
                    var dataCenter = new DataCenter()
                    {
                        Name = dataCenterElement.Name, Value = dataCenterElement.DataCenter
                    };
                    AddDataCenter(dataCenter);
                }
            }
        }