private static SampleTypeConfigCollection LoadSampleTypeConfigCollection(string configSectionFullName) { SampleTypeConfigCollection result = null; var configurationSection = ConfigurationManager.GetSection(configSectionFullName); if (configurationSection != null) { var sampleTypeConfigCollectionProvider = configurationSection as ISampleTypeConfigCollectionProvider; if (sampleTypeConfigCollectionProvider != null) { result = sampleTypeConfigCollectionProvider.GetSampleTypeConfigCollection(); } } return(result); }
/// <summary> /// Creates new instance of <see cref="ConfigFileSampleTypeStructureProvider"/> /// </summary> /// <param name="configSectionFullName">config section full name</param> public ConfigFileSampleTypeStructureProvider(string configSectionFullName) { this.sampleTypeConfigCollection = LoadSampleTypeConfigCollection(configSectionFullName); }
/// <summary> /// Creates new instance of <see cref="ConfigFileSampleTypeStructureProvider"/> /// </summary> /// <param name="configSectionFullName">config section full name</param> public ConfigFileSampleTypeStructureProvider(string configSectionFullName) { this.sampleTypeConfigCollection = LoadSampleTypeConfigCollection(configSectionFullName); }