System.Configuration.ErrorInfoXmlDocument.CreateSectionXmlNode C# (CSharp) Метод

CreateSectionXmlNode() статический приватный Метод

static private CreateSectionXmlNode ( ConfigXmlReader reader ) : XmlNode
reader ConfigXmlReader
Результат System.Xml.XmlNode
        static internal XmlNode CreateSectionXmlNode(ConfigXmlReader reader) {
            ErrorInfoXmlDocument doc = new ErrorInfoXmlDocument();
            doc.LoadFromConfigXmlReader(reader);
            XmlNode xmlNode = doc.DocumentElement;

            return xmlNode;
        }

Usage Example

Пример #1
0
 private object CreateSectionImpl(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord, SectionRecord sectionRecord, object parentConfig, ConfigXmlReader reader)
 {
     if (this._sectionCtor != null)
     {
         ConfigurationSection section = (ConfigurationSection)System.Configuration.TypeUtil.InvokeCtorWithReflectionPermission(this._sectionCtor);
         section.SectionInformation.SetRuntimeConfigurationInformation(configRecord, factoryRecord, sectionRecord);
         section.CallInit();
         ConfigurationSection parentElement = (ConfigurationSection)parentConfig;
         section.Reset(parentElement);
         if (reader != null)
         {
             section.DeserializeSection(reader);
         }
         ConfigurationErrorsException errors = section.GetErrors();
         if (errors != null)
         {
             throw errors;
         }
         section.SetReadOnly();
         section.ResetModified();
         return(section);
     }
     if (reader != null)
     {
         XmlNode xmlNode = ErrorInfoXmlDocument.CreateSectionXmlNode(reader);
         CheckForLockAttributes(factoryRecord.ConfigKey, xmlNode);
         object configContext = configRecord.Host.CreateDeprecatedConfigContext(configRecord.ConfigPath);
         return(this._sectionHandler.Create(parentConfig, configContext, xmlNode));
     }
     return(null);
 }
All Usage Examples Of System.Configuration.ErrorInfoXmlDocument::CreateSectionXmlNode