/// <summary>
 /// Reads the specified configuration section into a
 /// <see cref="System.Collections.Specialized.NameValueCollection"/>.
 /// </summary>
 /// <param name="resource">The resource to read.</param>
 /// <param name="configSection">The section name.</param>
 /// <returns>
 /// A newly populated
 /// <see cref="System.Collections.Specialized.NameValueCollection"/>.
 /// </returns>
 /// <exception cref="System.IO.IOException">
 /// If any errors are encountered while attempting to open a stream
 /// from the supplied <paramref name="resource"/>.
 /// </exception>
 /// <exception cref="System.Xml.XmlException">
 /// If any errors are encountered while loading or reading (this only applies to
 /// v1.1 and greater of the .NET Framework) the actual XML.
 /// </exception>
 /// <exception cref="System.Exception">
 /// If any errors are encountered while loading or reading (this only applies to
 /// v1.0 of the .NET Framework).
 /// </exception>
 /// <exception cref="Spring.Objects.FatalObjectException">
 /// If the configuration section was otherwise invalid.
 /// </exception>
 public static NameValueCollection Read(IResource resource, string configSection)
 {
     return(ConfigurationReader.Read(resource, configSection, new NameValueCollection()));
 }
 /// <summary>
 /// Reads the specified configuration section into the supplied
 /// <see cref="System.Collections.Specialized.NameValueCollection"/>.
 /// </summary>
 /// <param name="resource">The resource to read.</param>
 /// <param name="configSection">The section name.</param>
 /// <param name="properties">
 /// The collection that is to be populated. May be
 /// <see langword="null"/>.
 /// </param>
 /// <returns>
 /// A newly populated
 /// <see cref="System.Collections.Specialized.NameValueCollection"/>.
 /// </returns>
 /// <exception cref="System.IO.IOException">
 /// If any errors are encountered while attempting to open a stream
 /// from the supplied <paramref name="resource"/>.
 /// </exception>
 /// <exception cref="System.Xml.XmlException">
 /// If any errors are encountered while loading or reading (this only applies to
 /// v1.1 and greater of the .NET Framework) the actual XML.
 /// </exception>
 /// <exception cref="System.Exception">
 /// If any errors are encountered while loading or reading (this only applies to
 /// v1.0 of the .NET Framework).
 /// </exception>
 /// <exception cref="Spring.Objects.FatalObjectException">
 /// If the configuration section was otherwise invalid.
 /// </exception>
 public static NameValueCollection Read(
     IResource resource, string configSection, NameValueCollection properties)
 {
     return(ConfigurationReader.Read(resource, configSection, properties, true));
 }