/// <summary>Creates a new instance of the RequestLifeCycleHandler class.</summary>
 /// <param name="webContext">The web context wrapper.</param>
 public RequestLifecycleHandler(IWebContext webContext, EventBroker broker, InstallationManager installer, IRequestDispatcher dispatcher, IErrorHandler errors, AdminSection editConfig, HostSection hostConfig)
     : this(webContext, broker, installer, dispatcher, errors)
 {
     checkInstallation = editConfig.Installer.CheckInstallationStatus;
     //installerUrl = editConfig.Installer.InstallUrl;
     rewriteMethod = hostConfig.Web.Rewrite;
     _adminConfig = editConfig;
 }
 /// <summary>Creates a new instance of the RequestLifeCycleHandler class.</summary>
 /// <param name="webContext">The web context wrapper.</param>
 public RequestLifecycleHandler(IWebContext webContext, EventBroker broker, InstallationManager installer, IRequestDispatcher dispatcher, IErrorHandler errors)
 {
     this.webContext = webContext;
     this.broker = broker;
     this.errors = errors;
     this.installer = installer;
     this.dispatcher = dispatcher;
     _adminConfig = null;
 }
        /// <summary>Subscribes to applications events.</summary>
        /// <param name="broker">The application.</param>
        public void Init(EventBroker broker)
        {
            Debug.WriteLine("RequestLifeCycleHandler.Init");

            broker.BeginRequest += Application_BeginRequest;
            broker.AuthorizeRequest += Application_AuthorizeRequest;
            broker.AcquireRequestState += Application_AcquireRequestState;
            broker.Error += Application_Error;
            broker.EndRequest += Application_EndRequest;
        }
Exemple #4
0
 static EventBroker()
 {
     Instance = new EventBroker();
 }