Exemple #1
0
        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);
        }
Exemple #2
0
 /// <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);
 }
		/// <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);
		}