Added RedirectUsingNamedRoute
[castle.git] / InversionOfControl / Castle.MicroKernel / ModelBuilder / IComponentModelBuilder.cs
blob428054405fd9cc6e3825d32c6eb6de8abd67baea
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.MicroKernel
17 using System;
18 using System.Collections;
20 using Castle.Core;
22 using Castle.MicroKernel.ModelBuilder;
24 /// <summary>
25 /// Implementors must construct a populated
26 /// instance of ComponentModel by inspecting the component
27 /// and|or the configuration.
28 /// </summary>
29 public interface IComponentModelBuilder
31 /// <summary>
32 /// Constructs a new ComponentModel by invoking
33 /// the registered contributors.
34 /// </summary>
35 /// <param name="key"></param>
36 /// <param name="service"></param>
37 /// <param name="classType"></param>
38 /// <param name="extendedProperties"></param>
39 /// <returns></returns>
40 ComponentModel BuildModel(String key, Type service, Type classType, IDictionary extendedProperties);
42 /// <summary>
43 /// "To give or supply in common with others; give to a
44 /// common fund or for a common purpose". The contributor
45 /// should inspect the component, or even the configuration
46 /// associated with the component, to add or change information
47 /// in the model that can be used later.
48 /// </summary>
49 void AddContributor(IContributeComponentModelConstruction contributor);
51 /// <summary>
52 /// Removes the specified contributor
53 /// </summary>
54 /// <param name="contributor"></param>
55 void RemoveContributor(IContributeComponentModelConstruction contributor);
57 IContributeComponentModelConstruction[] Contributors { get; }