GetConfig() публичный Метод

public GetConfig ( string sectionName ) : object
sectionName string
Результат object
Пример #1
0
        object GetConfigInternal(string sectionName)
        {
            object handler = GetHandler(sectionName);
            IConfigurationSectionHandler iconf = handler as IConfigurationSectionHandler;

            if (iconf == null)
            {
                return(handler);
            }

            object parentConfig = null;

            if (parent != null)
            {
                parentConfig = parent.GetConfig(sectionName);
            }

            XmlDocument doc = GetDocumentForSection(sectionName);

            if (doc == null || doc.DocumentElement == null)
            {
                return(parentConfig);
            }

            return(iconf.Create(parentConfig, fileName, doc.DocumentElement));
        }
Пример #2
0
 public object GetConfig(string sectionName)
 {
     Init();
     return(config.GetConfig(sectionName));
 }