Removed untyped contructor from ComponentRegistration and add a protected setter.
[castle.git] / Core / Castle.Core / Model / Configuration / IConfiguration.cs
blob436e2ce62906639235522d2b561d4657f6a2b71e
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
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
17 using System;
18 using System.Collections;
19 using System.Collections.Specialized;
21 /// <summary>
22 /// Summary description for IConfiguration.
23 /// </summary>
24 /// <summary>
25 /// <see cref="IConfiguration"/> is a interface encapsulating a configuration node
26 /// used to retrieve configuration values.
27 /// </summary>
28 public interface IConfiguration
30 /// <summary>
31 /// Gets the name of the node.
32 /// </summary>
33 /// <value>
34 /// The Name of the node.
35 /// </value>
36 String Name { get; }
38 /// <summary>
39 /// Gets the value of the node.
40 /// </summary>
41 /// <value>
42 /// The Value of the node.
43 /// </value>
44 String Value { get; }
46 /// <summary>
47 /// Gets an <see cref="ConfigurationCollection"/> of <see cref="IConfiguration"/>
48 /// elements containing all node children.
49 /// </summary>
50 /// <value>The Collection of child nodes.</value>
51 ConfigurationCollection Children { get; }
53 /// <summary>
54 /// Gets an <see cref="IDictionary"/> of the configuration attributes.
55 /// </summary>
56 NameValueCollection Attributes { get; }
58 /// <summary>
59 /// Gets the value of the node and converts it
60 /// into specified <see cref="Type"/>.
61 /// </summary>
62 /// <param name="type">The <see cref="Type"/></param>
63 /// <param name="defaultValue">
64 /// The Default value returned if the convertion fails.
65 /// </param>
66 /// <returns>The Value converted into the specified type.</returns>
67 object GetValue(Type type, object defaultValue);