1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.Core
.Configuration
18 using System
.Collections
;
19 using System
.Collections
.Specialized
;
22 /// Summary description for IConfiguration.
25 /// <see cref="IConfiguration"/> is a interface encapsulating a configuration node
26 /// used to retrieve configuration values.
28 public interface IConfiguration
31 /// Gets the name of the node.
34 /// The Name of the node.
39 /// Gets the value of the node.
42 /// The Value of the node.
47 /// Gets an <see cref="ConfigurationCollection"/> of <see cref="IConfiguration"/>
48 /// elements containing all node children.
50 /// <value>The Collection of child nodes.</value>
51 ConfigurationCollection Children { get; }
54 /// Gets an <see cref="IDictionary"/> of the configuration attributes.
56 NameValueCollection Attributes { get; }
59 /// Gets the value of the node and converts it
60 /// into specified <see cref="Type"/>.
62 /// <param name="type">The <see cref="Type"/></param>
63 /// <param name="defaultValue">
64 /// The Default value returned if the convertion fails.
66 /// <returns>The Value converted into the specified type.</returns>
67 object GetValue(Type type
, object defaultValue
);