internal static void Save(ConfigurableObject configObject, ProviderPropertyDefinition property, UserConfigurationXmlHelper.GetXmlUserConfigurationDelegate getXmlUserConfigurationDelegate)
 {
     UserConfigurationXmlHelper.Save(configObject, SaveMode.NoConflictResolution, property, getXmlUserConfigurationDelegate);
 }
        internal static void Save(ConfigurableObject configObject, SaveMode saveMode, ProviderPropertyDefinition property, UserConfigurationXmlHelper.GetXmlUserConfigurationDelegate getXmlUserConfigurationDelegate)
        {
            Util.ThrowOnNullArgument(configObject, "configObject");
            Util.ThrowOnNullArgument(property, "property");
            bool flag = false;

            do
            {
                using (UserConfiguration userConfiguration = getXmlUserConfigurationDelegate(!flag))
                {
                    using (Stream xmlStream = userConfiguration.GetXmlStream())
                    {
                        DataContractSerializer dataContractSerializer = new DataContractSerializer(property.Type);
                        xmlStream.SetLength(0L);
                        dataContractSerializer.WriteObject(xmlStream, configObject[property]);
                    }
                    try
                    {
                        userConfiguration.Save(saveMode);
                        break;
                    }
                    catch (ObjectExistedException)
                    {
                        if (flag)
                        {
                            throw;
                        }
                        flag = true;
                    }
                }
            }while (flag);
        }
 internal static ConfigurableObject Fill(ConfigurableObject configObject, ProviderPropertyDefinition property, UserConfigurationXmlHelper.GetXmlUserConfigurationDelegate getXmlUserConfigurationDelegate)
 {
     return(UserConfigurationXmlHelper.Fill(configObject, property, (bool createIfNonexisting) => getXmlUserConfigurationDelegate(createIfNonexisting)));
 }