Removed untyped contructor from ComponentRegistration and add a protected setter.
[castle.git] / Experiments / Castle.MonoRail.Generator / templates / httpapp.vm
blobe779925257dbaaee2d3ff7a4f27100812316a9a3
1 namespace ${basename}\r
2 {\r
3         using System.Web;\r
4 \r
5         using Castle.Windsor;\r
6 \r
7 \r
8         public class MyHttpApplication : HttpApplication, IContainerAccessor\r
9         {\r
10                 private static WindsorContainer container;\r
12                 public void Application_OnStart() \r
13                 {\r
14                         // You can replace by your container subclass\r
15                         container = new MyContainer();\r
16                 }\r
18                 public void Application_OnEnd() \r
19                 {\r
20                         container.Dispose();\r
21                 }\r
23                 #region IContainerAccessor implementation\r
25                 public IWindsorContainer Container\r
26                 {\r
27                         get { return container; }\r
28                 }\r
30                 #endregion\r
31         }\r