예제 #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);
        }
예제 #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);
 }