Exemplo n.º 1
0
        /// <summary>
        /// Initializes this HttpModule
        /// </summary>
        /// <param name="app">The <see cref="HttpApplication"/>.</param>
        public void Init(HttpApplication app)
        {
            if (_map == null)
            {
                _map = new ServicePointMap();
                _map.MapServicePoints(typeof(ServiceHandler));
            }

            if (_handler == null)
            {
                _handler = new ServiceHandler();
                _handler.Init();
            }

            Logger.General.Debug("ApiModule initialized.");

            // Need to look into using Async so more requests can be handled at once
            //app.AddOnBeginRequestAsync(new BeginEventHandler(BeginRequest), new EndEventHandler(EndBeginRequest));
            app.BeginRequest += new EventHandler(OnBeginRequest);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes this HttpModule
        /// </summary>
        /// <param name="app">The <see cref="HttpApplication"/>.</param>
        public void Init(HttpApplication app)
        {
            if (_map == null)
            {
                _map = new ServicePointMap();
                _map.MapServicePoints(typeof(ServiceHandler));
            }

            if (_handler == null)
            {
                _handler = new ServiceHandler();
                _handler.Init();
            }

            Logger.General.Debug("ApiModule initialized.");

            // Need to look into using Async so more requests can be handled at once
            //app.AddOnBeginRequestAsync(new BeginEventHandler(BeginRequest), new EndEventHandler(EndBeginRequest));
            app.BeginRequest += new EventHandler(OnBeginRequest);
        }