Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ConfigurationReader.Read(IResource, String, NameValueCollection, Boolean) Method

Reads the specified configuration section into the supplied NameValueCollection.

[Visual Basic]
Public Overloads Shared Sub Read( _
   ByVal resource As IResource, _
   ByVal configSection As String, _
   ByVal properties As NameValueCollection, _
   ByVal overrideValues As Boolean _
)
[C#]
public static NameValueCollection Read(
   IResource resource,
   string configSection,
   NameValueCollection properties,
   bool overrideValues
);

Parameters

resource
The resource to read.
configSection
The section name.
properties
The collection that is to be populated. May be a null reference (Nothing in Visual Basic).
overrideValues
If a key already exists, is its value to be appended to the current value or replaced?

Return Value

The populated NameValueCollection.

Exceptions

Exception Type Condition
IOException If any errors are encountered while attempting to open a stream from the supplied resource.
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 If any errors are encountered while loading or reading (this only applies to v1.0 of the .NET Framework).
FatalObjectException If the configuration section was otherwise invalid.

See Also

ConfigurationReader Class | Spring.Objects.Factory.Config Namespace | ConfigurationReader.Read Overload List