BSky.Lifetime.Services.ConfigService.LoadCustomAppConfigurations C# (CSharp) Метод

LoadCustomAppConfigurations() приватный Метод

private LoadCustomAppConfigurations ( ) : void
Результат void
        private void LoadCustomAppConfigurations()
        {
            #region
            //string appFullPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            //string myconfigFile = System.IO.Path.Combine(appFullPath, "App.config");
            //ExeConfigurationFileMap myconfigFileMap = new ExeConfigurationFileMap();
            //myconfigFileMap.ExeConfigFilename = myconfigFile;
            //System.Configuration.Configuration myconfig = ConfigurationManager.OpenMappedExeConfiguration(myconfigFileMap, ConfigurationUserLevel.None);

            //myconfig.AppSettings.Settings["key"].Value = "New Value";
            //myconfig.Save();
            #endregion

            #region
            //// Open App.Config of executable
            //System.Configuration.Configuration config =
            // ConfigurationManager.OpenExeConfiguration
            //            (ConfigurationUserLevel.None);

            //// Add an Application Setting.
            //config.AppSettings.Settings.Add("ModificationDate",
            //               DateTime.Now.ToLongTimeString() + " ");

            //// Save the changes in App.config file.
            //config.Save(ConfigurationSaveMode.Modified);

            //// Force a reload of a changed section.
            //ConfigurationManager.RefreshSection("appSettings");

            ///// Diplay new values ////
            //foreach (string key in ConfigurationManager.AppSettings)
            //{
            //    string value = ConfigurationManager.AppSettings[key];
            //    Console.WriteLine("Key: {0}, Value: {1}", key, value);
            //}
            #endregion
        }