[System] Removed dead code.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Tue, 5 Jan 2016 11:43:48 +0000 (11:43 +0000)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Tue, 5 Jan 2016 11:56:26 +0000 (11:56 +0000)
mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs

index 237385a7ebb975ed09bec0ed3e1807e73e07e9c6..31d56ce09eb38acf77a1e3a2a9ab1466b66b1266 100644 (file)
@@ -613,8 +613,6 @@ namespace System.Configuration
                        UserSettingsGroup userGroup = config.GetSectionGroup ("userSettings") as UserSettingsGroup;
                        bool isRoaming = (level == ConfigurationUserLevel.PerUserRoaming);
 
-#if true // my reimplementation
-
                        if (userGroup == null) {
                                userGroup = new UserSettingsGroup ();
                                config.SectionGroups.Add ("userSettings", userGroup);
@@ -665,43 +663,6 @@ namespace System.Configuration
                        }
                        if (hasChanges)
                                config.Save (ConfigurationSaveMode.Minimal, true);
-
-#else // original impl. - likely buggy to miss some properties to save
-
-                       foreach (ConfigurationSection configSection in userGroup.Sections)
-                       {
-                               ClientSettingsSection userSection = configSection as ClientSettingsSection;
-                               if (userSection != null)
-                               {
-/*
-                                       userSection.Settings.Clear();
-
-                                       foreach (SettingsPropertyValue propertyValue in collection)
-                                       {
-                                               if (propertyValue.IsDirty)
-                                               {
-                                                       SettingElement element = new SettingElement(propertyValue.Name, SettingsSerializeAs.String);
-                                                       element.Value.ValueXml = new XmlDocument();
-                                                       element.Value.ValueXml.InnerXml = (string)propertyValue.SerializedValue;
-                                                       userSection.Settings.Add(element);
-                                               }
-                                       }
-*/
-                                       foreach (SettingElement element in userSection.Settings)
-                                       {
-                                               if (collection [element.Name] != null) {
-                                                       if (collection [element.Name].Property.Attributes.Contains (typeof (SettingsManageabilityAttribute)) != isRoaming)
-                                                               continue;
-
-                                                       element.SerializeAs = SettingsSerializeAs.String;
-                                                       element.Value.ValueXml.InnerXml = (string) collection [element.Name].SerializedValue;   ///Value = XmlElement
-                                               }
-                                       }
-                               }
-                       }
-                       config.Save (ConfigurationSaveMode.Minimal, true);
-#endif
                }
 
                // NOTE: We should add here all the chars that are valid in a name of a class (Ecma-wise),