System.Configuration.MgmtConfigurationRecord.WriteSectionUpdate C# (CSharp) Méthode

WriteSectionUpdate() private méthode

private WriteSectionUpdate ( XmlUtilWriter utilWriter, DefinitionUpdate update, int linePosition, int indent, bool skipFirstIndent ) : void
utilWriter XmlUtilWriter
update DefinitionUpdate
linePosition int
indent int
skipFirstIndent bool
Résultat void
        private void WriteSectionUpdate(XmlUtilWriter utilWriter, DefinitionUpdate update, int linePosition, int indent, bool skipFirstIndent) {
            ConfigurationSection configSection = (ConfigurationSection) update.SectionRecord.Result;
            string updatedXml;

            if (!String.IsNullOrEmpty(configSection.SectionInformation.ConfigSource)) {
                updatedXml = string.Format(CultureInfo.InvariantCulture, FORMAT_SECTION_CONFIGSOURCE, configSection.SectionInformation.Name, configSection.SectionInformation.ConfigSource);
            }
            else {
                updatedXml = update.UpdatedXml;
            }

            string formattedXml = XmlUtil.FormatXmlElement(updatedXml, linePosition, indent, skipFirstIndent);
            utilWriter.Write(formattedXml);
        }