private static AnotherTypeConfigCollection LoadAnotherTypeConfigCollection(string configSectionFullName) { AnotherTypeConfigCollection result = null; var configurationSection = ConfigurationManager.GetSection(configSectionFullName); if (configurationSection != null) { var anotherTypeConfigCollectionProvider = configurationSection as IAnotherTypeConfigCollectionProvider; if (anotherTypeConfigCollectionProvider != null) { result = anotherTypeConfigCollectionProvider.GetAnotherTypeConfigCollection(); } } return(result); }
/// <summary> /// Creates new instance of <see cref="ConfigFileAnotherTypeStructureProvider"/> /// </summary> /// <param name="configSectionFullName">config section full name</param> public ConfigFileAnotherTypeStructureProvider(string configSectionFullName) { this.anotherTypeConfigCollection = LoadAnotherTypeConfigCollection(configSectionFullName); }