Somehow missed this with earlier checkin of fluent interface.
[castle.git] / Experiments / Castle.Igloo / Igloo.Clinic.Web / Global.asax.cs
blob672edbc6a91551d649c4c5bf980484d56ac85fd5
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
5 using System.Web;
6 using Castle.Igloo.LifestyleManager;
7 using Castle.MicroKernel.SubSystems.Configuration;
8 using Castle.Core.Resource;
9 using Castle.Windsor;
10 using Castle.Windsor.Configuration.Interpreters;
12 namespace Igloo.Clinic.Web
14 /// <summary>
15 /// Description résumée de Global.
16 /// </summary>
17 public class Global : HttpApplication, IContainerAccessor
19 /// <summary>
20 /// Variable nécessaire au concepteur.
21 /// </summary>
22 private IContainer components = null;
24 private static IWindsorContainer _container = null;
26 #region IContainerAccessor Members
28 public IWindsorContainer Container
30 get { return _container; }
33 #endregion
35 public Global()
37 InitializeComponent();
40 protected void Application_Start(Object sender, EventArgs e)
42 DefaultConfigurationStore store = new DefaultConfigurationStore();
43 XmlInterpreter interpreter = new XmlInterpreter(new ConfigResource());
44 interpreter.ProcessResource(interpreter.Source, store);
46 _container = new WindsorContainer(interpreter);
49 protected void Session_Start(Object sender, EventArgs e)
54 protected void Application_BeginRequest(Object sender, EventArgs e)
59 protected void Application_EndRequest(Object sender, EventArgs e)
64 protected void Application_AuthenticateRequest(Object sender, EventArgs e)
69 protected void Application_Error(Object sender, EventArgs e)
71 //Exception ex = Server.GetLastError().GetBaseException();
75 protected void Session_End(Object sender, EventArgs e)
77 ScopeLifestyleModule.ReleaseSessionScopeComponent(this, e);
80 protected void Application_End(Object sender, EventArgs e)
82 _container.Dispose();
85 #region Code généré par le Concepteur Web Form
86 /// <summary>
87 /// Méthode requise pour la prise en charge du concepteur - ne modifiez pas
88 /// le contenu de cette méthode avec l'éditeur de code.
89 /// </summary>
90 private void InitializeComponent()
92 this.components = new Container();
94 #endregion