Fixing an issue with output parameters that are of type IntPtr
[castle.git] / Experiments / Castle.MonoRail.Generator / templates / container.vm
blob960b21874d8dfa7d129d8dacbf27e750ccc65498
1 namespace ${basename}\r
2 {\r
3         using System;\r
4 \r
5         using Castle.Windsor;\r
6         using Castle.Windsor.Configuration.Interpreters;\r
7 \r
8         using Castle.Model.Resource;\r
9 \r
10         using Castle.MicroKernel;\r
12         using Castle.MonoRail.WindsorExtension;\r
15         public class MyContainer : WindsorContainer\r
16         {\r
17                 // Using AppDomain as configuration source\r
18                 public MyContainer() : base( new XmlInterpreter(new ConfigResource()) )\r
19                 {\r
20                         Init();\r
21                 }\r
23                 public void Init()\r
24                 {\r
25                         RegisterFacilities();\r
26                         RegisterComponents();\r
27                 }\r
29                 private void RegisterFacilities()\r
30                 {\r
31                         AddFacility( "rails", new RailsFacility() );\r
32                         \r
33                         // You can use more :-)\r
34                         // AddFacility( "activerecord", new ActiveRecordFacility() );\r
35                 }\r
37                 protected void RegisterComponents()\r
38                 {\r
39                         // Standard components\r
40                         // AddComponent( "author.dao", typeof(AuthorDao) );\r
42                         // CoR Filters\r
43                         // AddComponent( "auth.filter", typeof(AuthenticationCheckFilter) );\r
45                         // CoR Controllers\r
46                         // AddComponent( "intro.controller", typeof(IntroController) );\r
47                 }\r
48         }\r