Minor changes to improve testability of helpers
[castle.git] / Samples / InversionOfControl / ComplexConfiguration / config.xml
bloba64d2fbde21e20336637ffda70b7c5ebb774dd74
1 <?xml version="1.0" encoding="utf-8" ?> \r
2 \r
3 <configuration>\r
4         <!-- \r
5                 Please note the usage of service and type attributes.\r
6                 Windsor will automatically installs the components and \r
7                 facilities with a type attribute (and optionally service \r
8                 for components)\r
9         -->\r
10         \r
11         <!--\r
12         \r
13         This is a facility configuration example:\r
14         \r
15         <facilities>\r
16         \r
17                 <facility id="nhibernate" type="Full Type Name, AssemblyName">\r
18                 \r
19                 </facility>\r
20         \r
21         </facilities>\r
22         \r
23         -->\r
26     <components>\r
28         <component id="smtpemailsender" \r
29                         service="ComplexConfiguration.IEmailSender, ComplexConfiguration" \r
30                         type="ComplexConfiguration.Components.SmtpEmailSender, ComplexConfiguration">\r
31             \r
32             <parameters>\r
33                 <hosts>\r
34                     <!-- \r
35                     \r
36                                                 The following nodes will be converted to an array of String \r
37                                                 which is what the component expects. If the component expected\r
38                                                 an int[], the MicroKernel would try to convert each element \r
39                                                 as well.\r
40                                                 \r
41                                                 The MicroKernel also supports\r
42                                                 - Dictionaries\r
43                                                   <dict keyType="System.String, mscorlib" valueType="System.Int32, mscorlib">\r
44                                                     <item key="key1">1</item>\r
45                                                     <item key="key2">2</item>\r
46                                                   </dict>\r
47                                                   \r
48                                                 - Lists \r
49                                                   <list type="typetobeconverted">\r
50                                                     <item>item1</item>\r
51                                                     <item>item2</item>\r
52                                                   </list>\r
53                     -->\r
54                                         <array>\r
55                                                 <elem>MyFirstHost</elem>\r
56                                                 <elem>OtherHost</elem>\r
57                                         </array>\r
58                                 </hosts>\r
59             </parameters>\r
60             \r
61         </component>\r
62         \r
63         <component id="newsletter" \r
64                         service="ComplexConfiguration.INewsletterService, ComplexConfiguration" \r
65                         type="ComplexConfiguration.Components.SimpleNewsletterService, ComplexConfiguration">\r
66             \r
67             <parameters>\r
68                 <!-- This argument will be converted to a System.Type        -->\r
69                 <sometype>System.Collections.IList, mscorlib</sometype>\r
70                 <!-- Here we're overriding which IEmailSender implementation \r
71                      this component should use                               -->\r
72                 <sender>${smtpemailsender}</sender>\r
73                 <!-- Same thing for ITemplateEngine                          -->\r
74                 <templateEngine>${nvelocityengine}</templateEngine>\r
75             </parameters>\r
76             \r
77         </component>        \r
79         <component id="nvelocityengine" \r
80                         service="ComplexConfiguration.ITemplateEngine, ComplexConfiguration" \r
81                         type="ComplexConfiguration.Components.NVelocityTemplateEngine, ComplexConfiguration" />\r
82         \r
83     </components>\r
85 </configuration>