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
.MicroKernel
18 using System
.Collections
;
22 using Castle
.MicroKernel
.ModelBuilder
;
25 /// Implementors must construct a populated
26 /// instance of ComponentModel by inspecting the component
27 /// and|or the configuration.
29 public interface IComponentModelBuilder
32 /// Constructs a new ComponentModel by invoking
33 /// the registered contributors.
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
);
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.
49 void AddContributor(IContributeComponentModelConstruction contributor
);
52 /// Removes the specified contributor
54 /// <param name="contributor"></param>
55 void RemoveContributor(IContributeComponentModelConstruction contributor
);
57 IContributeComponentModelConstruction
[] Contributors { get; }