1 namespace ${basename}
\r
5 using Castle.Windsor;
\r
6 using Castle.Windsor.Configuration.Interpreters;
\r
8 using Castle.Model.Resource;
\r
10 using Castle.MicroKernel;
\r
12 using Castle.MonoRail.WindsorExtension;
\r
15 public class MyContainer : WindsorContainer
\r
17 // Using AppDomain as configuration source
\r
18 public MyContainer() : base( new XmlInterpreter(new ConfigResource()) )
\r
25 RegisterFacilities();
\r
26 RegisterComponents();
\r
29 private void RegisterFacilities()
\r
31 AddFacility( "rails", new RailsFacility() );
\r
33 // You can use more :-)
\r
34 // AddFacility( "activerecord", new ActiveRecordFacility() );
\r
37 protected void RegisterComponents()
\r
39 // Standard components
\r
40 // AddComponent( "author.dao", typeof(AuthorDao) );
\r
43 // AddComponent( "auth.filter", typeof(AuthenticationCheckFilter) );
\r
46 // AddComponent( "intro.controller", typeof(IntroController) );
\r