Exemplo n.º 1
0
        private static TreeStructuredTypeConfigCollection LoadYetAnotherTypeConfigCollection(string configSectionFullName)
        {
            TreeStructuredTypeConfigCollection result = null;

            var configurationSection = ConfigurationManager.GetSection(configSectionFullName);

            if (configurationSection != null)
            {
                var yetAnotherTypeConfigCollectionProvider = configurationSection as IYetAnotherTypeConfigCollectionProvider;
                if (yetAnotherTypeConfigCollectionProvider != null)
                {
                    result = yetAnotherTypeConfigCollectionProvider.GetYetAnotherTypeConfigCollection();
                }
            }

            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates new instance of <see cref="ConfigFileYetAnotherTypeStructureProvider"/>
 /// </summary>
 /// <param name="configSectionFullName">config section full name</param>
 public ConfigFileYetAnotherTypeStructureProvider(string configSectionFullName)
 {
     this.yetAnotherTypeConfigCollection = LoadYetAnotherTypeConfigCollection(configSectionFullName);
 }